#include <bits/stdc++.h>
using namespace std;
double X[20], Y[20], A[20];
double pi = acos(-1);
double cnv(double x) { return (pi * x / 180.0); }
double DP[1 << 20];
int main() {
  double l, r, nw, ang;
  int i, j, n;
  scanf("%d%lf%lf", &n, &l, &r);
  for (i = 0; i < n; i++) {
    scanf("%lf%lf%lf", &X[i], &Y[i], &A[i]);
    A[i] = cnv(A[i]);
  }
  for (i = 0; i < (1 << n); i++) DP[i] = l;
  for (i = 0; i < (1 << n); i++) {
    for (j = 0; j < n; j++) {
      if (i & (1 << j)) continue;
      ang = atan2(DP[i] - X[j], Y[j]) + A[j];
      if (ang > pi / 2.00)
        nw = 1e+9;
      else
        nw = X[j] + tan(ang) * Y[j];
      DP[i | (1 << j)] = max(DP[i | (1 << j)], nw);
    }
  }
  printf("%.6lf\n", min(DP[(1 << n) - 1], r) - l);
  return 0;
}
