The hobbits Frodo and Sam are carrying the One Ring to Mordor. In order not to be spotted by orcs, they decided to go through the mountains.

The mountain relief can be represented as a polyline with n points (x_i, y_i), numbered from 1 to n (x_i < x_{i + 1} for 1 ≤ i ≤ n - 1). Hobbits start their journey at the point (x_1, y_1) and should reach the point (x_n, y_n) to complete their mission.

The problem is that there is a tower with the Eye of Sauron, which watches them. The tower is located at the point (x_n, y_n) and has the height H, so the Eye is located at the point (x_n, y_n + H). In order to complete the mission successfully, the hobbits have to wear cloaks all the time when the Sauron Eye can see them, i. e. when there is a direct line from the Eye to the hobbits which is not intersected by the relief.

The hobbits are low, so their height can be considered negligibly small, but still positive, so when a direct line from the Sauron Eye to the hobbits only touches the relief, the Eye can see them.

<image> The Sauron Eye can't see hobbits when they are in the left position, but can see them when they are in the right position.

The hobbits do not like to wear cloaks, so they wear them only when they can be spotted by the Eye. Your task is to calculate the total distance the hobbits have to walk while wearing cloaks.

Input

The first line of the input contains two integers n and H (2 ≤ n ≤ 2 ⋅ 10^5; 1 ≤ H ≤ 10^4) — the number of vertices in polyline and the tower height.

The next n lines contain two integers x_i, y_i each (0 ≤ x_i ≤ 4 ⋅ 10^5; 0 ≤ y_i ≤ 10^4) — the coordinates of the polyline vertices. It is guaranteed that x_i < x_{i + 1} for 1 ≤ i ≤ n - 1.

Output

Print one real number — the total distance the hobbits have to walk while wearing cloaks. Your answer will be considered correct if its absolute or relative error does not exceed 10^{-6} — formally, if your answer is a, and the jury's answer is b, your answer will be accepted if (|a - b|)/(max(1, b)) ≤ 10^{-6}.

Examples

Input


6 10
10 40
20 10
25 30
30 15
50 15
65 30


Output


70.4034587602


Input


9 5
0 0
5 10
15 10
20 0
25 11
30 0
35 10
50 10
60 5


Output


27.2787986124


Input


2 10000
0 10000
400000 0


Output


400124.9804748512
// // ?.?fg?jdK>hd<8?tgs|]7^ri+a

// #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #define int long long

// #define all(X) (X).begin(), (X).end()
// #define reset(X) memset(X, 0, sizeof(X))
// #define mp(a, b) make_pair(a, b)
// #define pb push_back
// #define endl '\n'
// #define fi first
// #define se second

// using namespace __gnu_pbds;
// using namespace std;
// // const int mod = 1e9+7;
// // const int mod3 = 1e6 + 3;
// const int mod=998'244'353;
// //const int mod=1e9+9;

// // const int MOD = mod;

// const int INF=2e18+10;
// // const int INF = 4e8 + 10;
// template <typename T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// template <typename T>
// using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

// #define read(n) \
// int n;      \
// cin >> n;
// #define readv(x, n)   \
// vector<int> x(n); \
// for (auto &i : x) \
//     cin >> i;

// typedef vector<int> vi;
// typedef vector<vector<int>> vvi;
// typedef pair<int, int> pii;

// template <typename T1, typename T2>
// void set_min(T1 &a, T2 b){
//     a = min(a, (T1)b);
// }
// /* template <typename T1, typename T2> */
// bool sort_by_sec(pair<int, int> a, pair<int,int> b)
// {
//     return make_pair(a.se, a.fi)<make_pair(b.se,b.fi);
// }

// template<typename T>
// vector<int> coordinate_compress(vector<T > a)
// {
//     set<T> s;
//     for(T elem:a)
//         s.insert(elem);

//     vector<T> temp;
//     for(T elem:s)
//         temp.push_back(elem);
//     map<T, int> counter;
//     for(int i=0;i<temp.size();i++)
//         counter[temp[i]] = i;
//     vector<int> to_return;
//     for(T elem:a)
//         to_return.push_back(counter[elem]);
//     return to_return;

// }

// int multiply(int a, int b, int in_mod) { return (int)(1LL*a * b % in_mod );}
// int mult_identity(int a) { return 1; }


// vector<int >multiply(const vector<int>& a, const vector<int>& b,int mod);
// vector<int> mult_identity(vector<int> a)
// {
//     return {1};
// }




// int power(int a, int b, int in_mod)
// {

//     int prod = mult_identity(a);
//     int mult = a % in_mod;
//     b%=(mod-1);
//     while (b != 0)
//     {
//         if (b % 2)
//         {
//             prod = multiply(prod, mult, in_mod);
//         }
//         mult = multiply(mult, mult, in_mod);
//         b /= 2;
//     }
//     return prod;
// }
// int mod_inv(int q, int in_mod)
// {

//     return power(q, in_mod - 2, in_mod);
// }

// // Finds the primitive root modulo p
// int generator(int p) {
//     vector<int> fact;
//     int phi = p-1, n = phi;
//     for (int i = 2; i * i <= n; ++i) {
//         if (n % i == 0) {
//             fact.push_back(i);
//             while (n % i == 0)
//                 n /= i;
//         }
//     }
//     if (n > 1)
//         fact.push_back(n);

//     for (int res = 2; res <= p; ++res) {
//         bool ok = true;
//         for (int factor : fact) {
//             if (power(res, phi / factor, p) == 1) {
//                 ok = false;
//                 break;
//             }
//         }
//         if (ok) return res;
//     }
//     return -1;
// }

// // const int root = generator(mod);
// // const int root_1 = mod_inv(root, mod);
// // const int root_pw = 1<<20;

// // const int mod = 998244353;
// const int root  = 15311432;
// const int root_pw = 1<<23;
// // const int root_1 = mod_inv(root, mod);
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


// void solve()
// {
//     int n;
//     cin>>n;
//     int dx1, dy1;
//     int dx2, dy2;
//     cin>>dx1>>dy1;
//     cin>>dx2>>dy2;


//     if(dx1 * dy2 == dy1 * dx2)
//     {
//         cout<<"NO"<<endl;
//         return;
//     }

//     int gx = abs(__gcd( dx1, dx2));

//     int a = -dx2/gx;
//     int b = dx1/gx;

//     int off1 = abs(a * dy1 + b * dy2);

//     int off2 = abs(gx);

//     // cerr<<off1<<" "<<off2<<endl;

//     if (n!= off1 * off2)
//     {
//         cout<<"NO"<<endl;
//         return;
//     }
//     else
//     {
//         vector<pair<int, int>> generator;
//         int cnt = 0;
//         bool flag = false;
//         for(int i= 0;i< off1;i++)
//         {
//             if(flag)
//                 break;
//             for(int j=0;j<off2;j++)
//             {
//                 generator.pb({j,i});
//                 cnt++;
//                 if(cnt>=n)
//                 {
//                     flag = true;
//                     break;
//                 }
//             }
//         }


//         assert((int)generator.size()==n);
//         cout<<"YES"<<endl;
//         for(auto i:generator)
//         {
//             cout<<i.fi<<" "<<i.se<<endl;
//         }
//     }


// }




// // void solve()
// // {
// //     int n;
// //     cin>>n;

// //     int x1, y1, x2,y2;
// //     cin>>x1>>y1>>x2>>y2;

// //     vector<pair<int, int>> o;
// //     int mx = 10;
// //     for(int i = -mx;i<=mx;i++)
// //     {
// //         for(int j = -mx;j<=mx;j++)
// //         {
// //             o.pb({i*x1 + j * x2, i*y1 + j* y2});
// //         }
// //     }
// //     sort(all(o));
// //     for(auto i:o)
// //     {
// //         cout<<i.fi<<" "<<i.se<<endl;
// //     }
// // }

// signed main()
// {
//     ios_base::sync_with_stdio(false);
//     cin.tie(NULL);
//     cerr.tie(NULL);
// #ifndef ONLINE_JUDGE
//     if (fopen("INPUT.txt", "r"))
//     {
//         freopen("INPUT.txt", "r", stdin);
//         freopen("OUTPUT.txt", "w", stdout);
//     }
// #endif
//     auto clk = clock();
//     // -------------------------------------Code starts here---------------------------------------------------------------------

//     int t = 1;
//     // cin >> t;
// //
//     for (int test = 1; test <= t; test++)
//     {
//         // cout<<"Case #"<<test<<": ";

//         solve();
//         //cout<<endl;
//     }

//     // -------------------------------------Code ends here------------------------------------------------------------------

//     clk = clock() - clk;
//     cerr << fixed << setprecision(6) << "Time: " << ((long double)clk) / CLOCKS_PER_SEC << "\n";
//     return 0;
// }


#include <bits/stdc++.h>
#include <string>
#include <cmath>
#include <sstream>
#include <unordered_map>
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for(ll i = (a-1); i >= (b); i--)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
#define spre cout<<fixed<<setprecision(15);
typedef long long int ll;
using namespace std;
//ll mod=67280421310721;
const ll mod=998244353;
// ll mod=1000000007;
ll INF=1e18+5;
ll po(ll a,ll b){
    ll re=1;
    while(b)
    {
        if(b%2==1)
        {
            re=(re*a);
            re%=mod;
        }
        a=(a*a);
        a%=mod;
        b>>=1;
    }
    return re;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("INPUT.txt", "r", stdin);
    freopen("OUTPUT.txt", "w", stdout);
    #endif
    int test=1;
    // cin>>test;
    spre
    while(test--)
    {
        int n;
        cin>>n;
        ll h;
        ll x[n],y[n];
        double ans=0,a,b;
        ll p,q;
        ll x1,x2,y1,y2;
        cin>>h;
        FOR(i,0,n)
        {
            cin>>x[i]>>y[i];
        }
        FOR(i,0,n)
        {
            x[i]=x[n-1]-x[i];
            y[i]=y[i]-h-y[n-1];
        }
        a=x[n-1]-x[n-2];
        b=y[n-1]-y[n-2];
        ans+=sqrt(a*a+b*b);
        q=x[n-2];
        p=y[n-2];
        FORD(i,n-2,0)
        {
            // cout<<ans<<'\n';
            if((y[i]*q)>=(p*x[i]))
            {
                x1=x[i];
                x2=x[i+1];
                y1=y[i];
                y2=y[i+1];
                if(q*(y1-y2)==p*(x1-x2))
                {
                    a=x1-x2;
                    b=y1-y2;
                }
                else
                {
                    a=(x1*(double(y1)-y2)-y1*(double(x1)-x2))/((double(y1)-y2)-p*(double(x1)-x2)/q);
                    b=p*a/q;
                    a=x[i]-a;
                    b=y[i]-b;
                }
                // cout<<a<<' '<<b<<' ';
                ans+=sqrt(a*a+b*b);
                p=y[i];
                q=x[i];
            }
        }
        cout<<ans;
    }
    return 0;
}