#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000;
const double EPS = 1E-7;
const double INF = 1E10;
struct segtree {
  struct node {
    int l, r;
    double tg, mn;
  } t[8 * MAXN + 5];
  void build(int x, int l, int r) {
    t[x].l = l, t[x].r = r, t[x].mn = 0;
    if (l == r) return;
    int mid = (l + r) >> 1;
    build((x << 1), l, mid), build((x << 1 | 1), mid + 1, r);
  }
  void pushup(int x) { t[x].mn = min(t[(x << 1)].mn, t[(x << 1 | 1)].mn); }
  void pushdown(int x) {
    if (t[x].tg) {
      t[(x << 1)].tg += t[x].tg, t[(x << 1 | 1)].tg += t[x].tg;
      t[(x << 1)].mn += t[x].tg, t[(x << 1 | 1)].mn += t[x].tg;
      t[x].tg = 0;
    }
  }
  void modify(int x, int l, int r, double k) {
    if (l > t[x].r || r < t[x].l) return;
    if (l <= t[x].l && t[x].r <= r) {
      t[x].tg += k, t[x].mn += k;
      return;
    }
    pushdown(x);
    modify((x << 1), l, r, k);
    modify((x << 1 | 1), l, r, k);
    pushup(x);
  }
  double query(int x, int l, int r) {
    if (l > t[x].r || r < t[x].l) return INF;
    if (l <= t[x].l && t[x].r <= r) return t[x].mn;
    pushdown(x);
    return min(query((x << 1), l, r), query((x << 1 | 1), l, r));
  }
} T;
struct node {
  double v0, s;
  int id;
  friend bool operator<(node a, node b) { return a.v0 < b.v0; }
} a[2 * MAXN + 5];
double e[2 * MAXN + 5];
int n, L;
int main() {
  scanf("%d%d", &n, &L);
  int lst = 0, cnt = 0;
  for (int i = 1; i <= n; i++) {
    int x, y;
    double s;
    scanf("%d%d%lf", &x, &y, &s);
    cnt++, a[cnt].id = cnt, a[cnt].v0 = 0, a[cnt].s = x - lst;
    lst = y;
    cnt++, a[cnt].id = cnt, a[cnt].v0 = s, a[cnt].s = y - x;
  }
  cnt++, a[cnt].id = cnt, a[cnt].v0 = 0, a[cnt].s = L - lst;
  sort(a + 1, a + cnt + 1);
  T.build(1, 1, cnt);
  for (int i = 1; i <= cnt; i++)
    if (a[i].v0)
      T.modify(1, a[i].id, cnt, e[i] = a[i].s / a[i].v0);
    else
      e[i] = 0;
  for (int i = 1; i <= cnt; i++) {
  }
  for (int i = 1; i <= cnt; i++) {
    double x = e[i] - (-a[i].s / (a[i].v0 + 2)), y = T.query(1, a[i].id, cnt),
           z = min(x, y);
    T.modify(1, a[i].id, cnt, -z), e[i] -= z;
  }
  double ans = 0;
  for (int i = 1; i <= cnt; i++) {
    ans += (e[i] + a[i].s) / (a[i].v0 + 1);
  }
  printf("%.10lf\n", ans);
}
