#include <bits/stdc++.h>
using namespace std;
long double cross(complex<long double> a, complex<long double> b) {
  return (b * conj(a)).imag();
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n, l;
  cin >> n >> l;
  vector<int> x(n), y(n);
  vector<long double> s(n);
  for (int i = (0); i < (n); ++i) cin >> x[i] >> y[i] >> s[i];
  x.push_back(l);
  vector<complex<long double>> maxi, opt;
  auto add_seg = [&](long double len, long double s) {
    if (len == 0) return;
    complex<long double> walk(len / (s + 2), -len / (s + 2));
    complex<long double> rest;
    if (s > 0) {
      rest = complex<long double>(len / s, len / s);
    } else {
      rest = complex<long double>(len, 0);
    }
    maxi.push_back(walk);
    opt.push_back(walk - rest);
  };
  long double prev = 0;
  for (int i = (0); i < (n + 1); ++i) {
    add_seg(x[i] - prev, 0);
    if (i < n) {
      add_seg(y[i] - x[i], s[i]);
      prev = y[i];
    }
  }
  int m = int(maxi.size());
  vector<int> perm(m);
  iota((perm).begin(), (perm).end(), 0);
  sort((perm).begin(), (perm).end(),
       [&](int i, int j) { return cross(opt[i], opt[j]) > 0; });
  vector<int> idx(m);
  for (int i = (0); i < (m); ++i) idx[perm[i]] = i;
  priority_queue<pair<int, long double>> segs;
  complex<long double> cur = 0;
  for (int i = (0); i < (m); ++i) {
    cur += maxi[i];
    segs.push({idx[i], 1});
    while (cur.imag() < 0) {
      auto pa = segs.top();
      segs.pop();
      int j = perm[pa.first];
      long double f = pa.second;
      long double sub = cur.imag() / opt[j].imag();
      if (sub > f) {
        cur -= opt[j] * f;
      } else {
        cur -= opt[j] * sub;
        cur = complex<long double>(cur.real(), 0);
        segs.push({idx[j], f - sub});
      }
    }
  }
  cout.precision(11);
  cout << cur.real() << endl;
}
