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
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
inline int sgn(double x) { return (x > eps) - (x < -eps); }
int inmid(double k1, double k2, double k3) {
  return sgn(k1 - k3) * sgn(k2 - k3) <= 0;
}
struct point {
  double x, y;
  point() {}
  point(double _x, double _y) : x(_x), y(_y) {}
  bool operator==(const point& b) const {
    return sgn(x - b.x) == 0 && sgn(y - b.y) == 0;
  }
  point operator+(const point& b) const { return point(x + b.x, y + b.y); }
  point operator-(const point& b) const { return point(x - b.x, y - b.y); }
  bool operator<(const point& b) const {
    return sgn(x - b.x) == 0 ? sgn(y - b.y) < 0 : x < b.x;
  }
  double operator*(const point& b) const { return x * b.x + y * b.y; }
  double operator^(const point& b) const { return x * b.y - y * b.x; }
  double len() { return hypot(x, y); }
  double len2() { return x * x + y * y; }
  double dis(const point& b) const { return hypot(x - b.x, y - b.y); }
  point operator*(const double& b) const { return point(x * b, y * b); }
  point operator/(const double& b) const { return point(x / b, y / b); }
  point left() { return point(-y, x); }
  point right() { return point(y, -x); }
  bool inPi() const { return sgn(y) == 1 || (sgn(y) == 0 && sgn(x) == -1); }
  point unit(const double& r = 1.0) {
    double l = len();
    return sgn(l) == 0 ? point(r, 0) : point(x * r / l, y * r / l);
  }
};
double dis(point p1, point p2) {
  double tmp = (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);
  return sqrt(tmp);
}
int inmid(point p1, point p2, point p3) {
  return inmid(p1.x, p2.x, p3.x) && inmid(p1.y, p2.y, p3.y);
}
int cmpAng(const point& a, const point& b) {
  return a.inPi() < b.inPi() || (a.inPi() == b.inPi() && sgn(a ^ b) > 0);
}
bool checkLineLine(point p1, point p2, point p3, point p4) {
  return sgn(((p3 - p1) ^ (p4 - p1)) - ((p3 - p2) ^ (p4 - p2))) != 0;
}
point getLineLine(point p1, point p2, point p3, point p4) {
  double w1 = (p1 - p3) ^ (p4 - p3), w2 = (p4 - p3) ^ (p2 - p3);
  return (p1 * w2 + p2 * w1) / (w1 + w2);
}
int intersect(double l1, double r1, double l2, double r2) {
  if (l1 > r1) swap(l1, r1);
  if (l2 > r2) swap(l2, r2);
  return sgn(r1 - l2) != -1 && sgn(r2 - l1) != -1;
}
int checkSegSeg(point k1, point k2, point k3, point k4) {
  return intersect(k1.x, k2.x, k3.x, k4.x) &&
         intersect(k1.y, k2.y, k3.y, k4.y) &&
         sgn((k3 - k1) ^ (k4 - k1)) * sgn((k3 - k2) ^ (k4 - k2)) <= 0 &&
         sgn((k1 - k3) ^ (k2 - k3)) * sgn((k1 - k4) ^ (k2 - k4)) <= 0;
}
point proj(point p1, point p2, point p3) {
  point k = p2 - p1;
  return p1 + k * ((p3 - p1) * k) / k.len2();
}
point reflect(point p1, point p2, point p3) {
  return proj(p1, p2, p3) * 2 - p3;
}
int clockwise(point p1, point p2, point p3) {
  return sgn((p2 - p1) ^ (p3 - p1));
}
bool onS(point a, point b, point c) {
  return inmid(a, b, c) && sgn((a - c) ^ (b - a)) == 0;
}
double disSegPt(point p1, point p2, point q) {
  point p3 = proj(p1, p2, q);
  if (inmid(p1, p2, p3)) return p3.dis(q);
  return min(p1.dis(q), p2.dis(q));
}
double disSegSeg(point k1, point k2, point k3, point k4) {
  if (checkSegSeg(k1, k2, k3, k4))
    return 0;
  else
    return min(min(disSegPt(k1, k2, k3), disSegPt(k1, k2, k4)),
               min(disSegPt(k3, k4, k1), disSegPt(k3, k4, k2)));
}
struct line {
  point s, e;
  line() {}
  line(point _s, point _e) : s(_s), e(_e) {}
  line(point p, double ang) {
    s = p;
    if (sgn(ang - pi / 2) == 0)
      e = (s + point(0, 1));
    else
      e = (s + point(1, tan(ang)));
  }
  line(double a, double b, double c) {
    if (sgn(a) == 0) {
      s = point(0, -c / b);
      e = point(1, -c / b);
    } else if (sgn(b) == 0) {
      s = point(-c / a, 0);
      e = point(-c / a, 1);
    } else {
      s = point(0, -c / b);
      e = point(1, (-c - a) / b);
    }
  }
  bool operator==(const line& v) { return (s == v.s) && (e == v.e); }
  double len() { return s.dis(e); }
  double ang() {
    double k = atan2(e.y - s.y, e.x - s.x);
    if (sgn(k) < 0) k += pi;
    if (sgn(k - pi) == 0) k -= pi;
    return k;
  }
  point dir() { return e - s; }
  int relation(const point& p) {
    int c = sgn((e - s) ^ (p - s));
    if (c < 0)
      return 1;
    else if (c > 0)
      return -1;
    else
      return 0;
  }
  bool pointonseg(const point& p) {
    return sgn((p - s) ^ (e - s)) == 0 && sgn((p - s) * (p - e)) <= 0;
  }
  bool parallel(line v) { return sgn((e - s) ^ (v.e - v.s)) == 0; }
};
bool sameDir(line l1, line l2) {
  return l1.parallel(l2) && sgn(l1.dir() * l2.dir()) == 1;
}
bool operator<(line l1, line l2) {
  if (sameDir(l1, l2)) return l2.relation(l1.s);
  return cmpAng(l1.dir(), l2.dir());
}
point getLineLine(line l1, line l2) {
  return getLineLine(l1.s, l1.e, l2.s, l2.e);
}
int checkpos(line l1, line l2, line l3) {
  return l3.relation(getLineLine(l1, l2));
}
const int maxn = 2e5 + 5;
int n, h;
vector<point> p;
point tmp, top;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> h;
  for (int i = 0; i < n; i++) {
    cin >> tmp.x >> tmp.y;
    p.push_back(tmp);
  }
  tmp.y += h;
  double ans = 0;
  ans += dis(p[n - 1], p[n - 2]);
  top = p[n - 2];
  line l1, l2;
  l1.s = tmp, l1.e = top;
  for (int i = n - 2; i >= 1; i--) {
    l2.s = p[i], l2.e = p[i - 1];
    if (l1.parallel(l2)) {
      if (top == l2.s) {
        ans += dis(p[i], p[i - 1]);
        top = p[i - 1], l1.e = top;
      }
      continue;
    };
    point x = getLineLine(l1, l2);
    ;
    if (l2.pointonseg(x)) {
      if (x == l2.s && sgn(l2.s.y - l2.e.y) == 1) continue;
      ans += dis(p[i - 1], x);
    }
    if (sgn(p[i - 1].y - top.y) >= 0) top = p[i - 1], l1.e = top;
  };
  cout << fixed << setprecision(10) << ans << '\n';
}
