#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y, a;
} p[22];
double calc(Point p, double L) {
  double h = p.y;
  if (p.x + 1e-9 < L) {
    double al = atan((L - p.x) / h) + p.a;
    if (al > 4 * atan(1) / 2 - 1e-9) return 1e9;
    return p.x + h * tan(al);
  }
  double al = p.a - atan((p.x - L) / h);
  return p.x + h * tan(al);
}
double dp[1 << 22];
int main() {
  int N;
  double L, R;
  scanf("%d %lf %lf", &N, &L, &R);
  for (int i = 0; i < N; i++) {
    scanf("%lf %lf %lf", &p[i].x, &p[i].y, &p[i].a);
    p[i].a = p[i].a / 45 * atan(1);
  }
  dp[0] = L;
  for (int i = 1; i < 1 << N; i++) {
    dp[i] = -1e9;
    for (int j = 0; j < N; j++) {
      if (i & (1 << j)) {
        dp[i] = max(dp[i], calc(p[j], dp[i ^ (1 << j)]));
      }
    }
  }
  printf("%.9lf\n", min(dp[(1 << N) - 1], R) - L);
  return 0;
}
