#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cstdio>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) ((abs((a)-(b)))<EPS)

int a[100001];
int n,l;

bool check(double f){
	double lf=l;
	double rec=0;
	bool flag=false;
	for(int j=0;j<3;j++){
		for(int i=1;i<=86400;i++){
			if(j==1&&a[i]!=0&&!flag){
				rec=lf;
				flag=true;
			}
			else if(j==2&&a[i]!=0){
				if(EQ(rec,lf))return true;
				return false;
			}
			double b=-a[i]+f;
			lf+=b;
			if(EQ(lf,0)||lf<0)return false;
			lf=min(lf,1.0*l);
		}
	}
	return true;
}

int main(){

	while(cin>>n>>l&&!(n==0&&l==0)){
		memset(a,0,sizeof(a));
		int s,t,u;
		for(int j=0;j<n;j++){
			cin>>s>>t>>u;
			for(int i=s+1;i<=t;i++)a[i]=u;
		}
		double ub=10000000;
		double lb=0;
		int cnt=50;
		while(cnt--){
			double mid=(ub+lb)/2;
			if(check(mid))ub=mid;
			else lb=mid;
		}
		printf("%.10f\n",ub);
	}
	return 0;
}