#include <bits/stdc++.h>
using namespace std;
int const MAX_N = 20;
int const MAX_L = 1 << MAX_N;
int const MAX_C = 0x3F3F3F3F;
int const NA = -1;
double const EPS = 1E-12;
double x[MAX_N];
double y[MAX_N];
double a[MAX_N];
double sa[MAX_N];
double ca[MAX_N];
double f[MAX_L];
int n;
double l;
double r;
int main(void) {
  while (scanf(" %d %lf %lf", &n, &l, &r) != EOF) {
    for (int i = 0; i < n; i++) {
      scanf(" %lf %lf %lf", &x[i], &y[i], &a[i]);
      a[i] *= M_PI / 180.0;
      sa[i] = sin(a[i]);
      ca[i] = cos(a[i]);
    }
    int m = 1 << n;
    for (int s = 0; s < m; s++) {
      f[s] = l;
    }
    double res = l;
    for (int s = 0; s < m; s++) {
      double d = f[s];
      for (int i = 0; i < n; i++) {
        if (!(s & (1 << i))) {
          int t = s ^ (1 << i);
          double dx = d - x[i];
          double dy = 0 - y[i];
          double ex = dx * ca[i] - dy * sa[i];
          double ey = dx * sa[i] + dy * ca[i];
          if (ey >= EPS) {
            f[t] = r;
            continue;
          }
          double e = x[i] - ex * y[i] / ey;
          e = min(e, r);
          f[t] = max(f[t], e);
        }
      }
      res = max(res, f[s]);
    }
    printf("%.20lf\n", res - l);
  }
  return 0;
}
