You happened to get a special bicycle. You can run with it incredibly fast because it has a turbo engine. You can't wait to try it off road to enjoy the power.

You planned to go straight. The ground is very rough with ups and downs, and can be seen as a series of slopes (line segments) when seen from a lateral view. The bicycle runs on the ground at a constant speed of V. Since running very fast, the bicycle jumps off the ground every time it comes to the beginning point of a slope slanting more downward than the previous, as illustrated below. It then goes along a parabola until reaching the ground, affected by the gravity with the acceleration of 9.8m/s2.

<image>

It is somewhat scary to ride the bicycle without any preparations - you might crash into rocks or fall into pitfalls. So you decided to perform a computer simulation of the ride.

Given a description of the ground, calculate the trace you will run on the ground by the bicycle. For simplicity, it is sufficient to output its length.



Input

The first line of the input has two integers N (2 ≤ N ≤ 10000) and V (1 ≤ V ≤ 10000), separated by a space. It is followed by N lines. The i-th line has two integers Xi and Yi (0 ≤ Xi, Yi ≤ 10000). V[m/s] is the ground speed of the bicycle. The (i - 1) line segments (Xi, Yi)-(Xi+1, Yi+1) form the slopes on the ground, with the sky in the positive direction of the Y axis. Each coordinate value is measured in meters.

The start is at (X1, Y1), and the goal is at (XN, YN). It is guaranteed that Xi < Xi+1 for 1 ≤ i ≤ N - 1.

You may assume that the distance of x-coordinate between the falling point and any endpoint (except for the jumping point) is not less than 10-5m.

Output

Output the length you will run on the ground with the bicycle, in meters. The value may be printed with any number of digits after the decimal point, should have the absolute or relative error not greater than 10-8.

Examples

Input

5 10
0 0
10 10
20 0
30 10
40 0


Output

22.22335598


Input

2 10
0 0
10000 0


Output

10000.00000000


Input

4 10000
0 0
1 1
9999 0
10000 10000


Output

11.21323169


Input

4 50
0 10000
1 10000
2 0
10000 0


Output

7741.23024274
#include<cmath>
#include<cstdio>
#include<vector>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const long double EPS=1e-8;
const long double PI=acos(-1);

struct point{
	long double x,y;
	point():x(0),y(0){}
	point(long double x,long double y):x(x),y(y){}
	point operator-(const point &a)const{ return point(x-a.x,y-a.y); }
};

long double cross(const point &a,const point &b){ return a.x*b.y-a.y*b.x; }

long double arg(const point &a){
	long double t=atan2(a.y,a.x);
	return t<0?t+2*PI:t;
}

struct line{
	point a,b;
	line(){}
	line(const point &a,const point &b):a(a),b(b){}
};

enum{CCW=1,CW=-1,ON=0};
int ccw(const point &a,const point &b,const point &c){
	long double rdir=cross(b-a,c-a);
	if(rdir>0) return CCW;
	if(rdir<0) return CW;
	return ON;
}

long double dist(const point &a,const point &b){
	return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}

const long double g=9.8;

int main(){
	int n;
	long double v; scanf("%d%Lf",&n,&v);
	point p[10000];
	rep(i,n) scanf("%Lf%Lf",&p[i].x,&p[i].y);

	long double a[9999],b[9999]; // y = a*x + b
	rep(i,n-1){
		a[i]=(p[i+1].y-p[i].y)/(p[i+1].x-p[i].x);
		b[i]=p[i].y-a[i]*p[i].x;
	}

	long double ans=dist(p[0],p[1]);
	for(int i=1;i<n-1;){
		if(ccw(p[i-1],p[i],p[i+1])!=CW){ // テ」ツつクテ」ツδ」テ」ツδウテ」ツδ療」ツ?療」ツ?ェテ」ツ??
			ans+=dist(p[i],p[i+1]);
			i++;
		}
		else{ // テ」ツつクテ」ツδ」テ」ツδウテ」ツδ療」ツ?凖」ツつ?
			long double vx=v*cos(arg(p[i]-p[i-1]));
			long double vy=v*sin(arg(p[i]-p[i-1]));
			long double x0=p[i].x,y0=p[i].y;
			for(;i+1<n;i++){
				// テヲツ鳴愿ゥツ敖「テ」ツ?ィテ」ツ?カテ」ツ?、テ」ツ?凝」ツつ凝ヲツ卍づ・ツ按サ t テ」ツつ津ヲツアツづ」ツつ?」ツつ?
				// A*t^2 + B*t + C = 0
				long double A=-g/2;
				long double B=vy-a[i]*vx;
				long double C=y0-a[i]*x0-b[i];
				if(B*B-4*A*C<0) continue;

				long double t0=(-B+sqrt(B*B-4*A*C))/(2*A);
				long double t1=(-B-sqrt(B*B-4*A*C))/(2*A);

				long double xx; // テヲツ鳴愿ゥツ敖「テ」ツ?ィテ」ツ?カテ」ツ?、テ」ツ?凝」ツつ凝、ツスツ催ァツスツョ
				xx=x0+vx*t0;
				if(p[i].x<xx && xx<p[i+1].x){ point q(xx,-g/2*t0*t0+vy*t0+y0); ans+=dist(q,p[i+1]); break; }
				xx=x0+vx*t1;
				if(p[i].x<xx && xx<p[i+1].x){ point q(xx,-g/2*t1*t1+vy*t1+y0); ans+=dist(q,p[i+1]); break; }
			}
			i++;
		}
	}

	printf("%.15Lf\n",ans);

	return 0;
}