Problem: 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

Solution (in CPP):

Solution:
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <complex>
using namespace std;
const long double EPS = 1e-8;
const long double INF = 1e12;
#define EQ(n,m) (abs((n)-(m)) < EPS)
typedef complex<long double> P;
typedef vector<P> VP;
#define X real()
#define Y imag()

vector<long double> solve_quadeq(long double a, long double b, long double c){
    vector<long double> ret;
    if(abs(a) < EPS){
        if(abs(b) > EPS) ret.push_back(-c/b);
        return ret;
    }
    long double d = b*b -4*a*c;
    if(abs(d) < EPS) d = 0;
    if(d < 0) return ret;
    if(d < 0) d = 0;
    ret.push_back((-b +sqrt(d))/(2*a));
    ret.push_back((-b -sqrt(d))/(2*a));
    return ret;
}

const long double g = 9.8;

int main(){
    int n;
    long double v;
    cin >> n >> v;
    VP p(n);
    for(int i=0; i<n; i++){
        long double x,y;
        cin >> x >> y;
        p[i] = P(x, y);
    }

    long double ans = abs(p[1] -p[0]);
    int pos = 1;
    while(pos < n-1){
        P launch = p[pos];
        P prevdir = p[pos] -p[pos-1];
        P nextdir = p[pos+1] -p[pos];
        //ジャンプしない
        if(arg(prevdir) < arg(nextdir) +EPS){
            ans += abs(nextdir);
            pos++;
            continue;
        }
        //ジャンプする
        //放物線の関数
        long double theta = arg(prevdir);
        long double vx = v *cos(theta);
        long double vy = v *sin(theta);
        for(; pos<n-1; pos++){
            //直線の式(y = rx+s)
            long double r,s;
            r = (p[pos+1].Y -p[pos].Y) /(p[pos+1].X -p[pos].X);
            s = -p[pos].X *r +p[pos].Y;
            //直線と放物線が交わる時間tの方程式(at^2 +bt +c = 0)
            long double a,b,c;
            a = g/2;
            b = r*vx -vy;
            c = r*launch.X -launch.Y +s;
            //交点をとる
            vector<long double> solt = solve_quadeq(a, b, c);
            bool solved = false;
            for(long double t: solt){
                if(t < EPS) continue;
                long double x = vx*t +launch.X;
                if(p[pos].X +EPS < x && x +EPS < p[pos+1].X){
                    P cp(x, -g*t*t/2 +vy*t +launch.Y);
                    ans += abs(cp -p[pos+1]);
                    pos++;
                    solved = true;
                    break;
                }
            }
            if(solved) break;
        }
    }
    cout << fixed << setprecision(10);
    cout << ans << endl;
    return 0;
}