#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

int main(){
  int N, L;
  const int D = 86400;
  while(cin>>N>>L && N){
    vector<int> usage(D);
    REP(i, N){
      int a, b, c; cin>>a>>b>>c;
      for(int u = a; u < b; u++) usage[u] += c;
    }
    double ub = 1000000, lb = 0;
    REP(iter, 100){
      double x = (lb + ub)/2;
      double Tank = L;
      bool ok = true;
      double fst, scn;
      REP(u, D * 2){
        Tank = Tank - usage[u % D] + x;
        if(Tank > L) Tank = L;
        if(Tank < 0) ok = false;
        if(u == D - 1) fst = Tank;
        if(u == 2 * D - 1) scn = Tank;
      }
      if(ok && fst <= scn){
        ub = x;
      }else{
        lb = x;
      }
    }
    printf("%.6lf\n", ub);
  }
  return 0;
}