#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double eps = 1e-9;
const int N = 1 << 20;
const int maxn = 20;
double x[maxn];
double y[maxn];
double alp[maxn];
double d[N];
int main() {
  int n, l, r;
  scanf("%d%d%d", &n, &l, &r);
  for (int i = 0; (i) < (n); ++i) {
    double xx, yy, zz;
    scanf("%lf%lf%lf", &xx, &yy, &zz);
    x[i] = xx, y[i] = yy, alp[i] = zz * M_PI / 180.;
  }
  for (int i = 0; (i) < ((1 << n)); ++i) d[i] = -1e100;
  d[0] = l;
  for (int mask = 0; (mask) < ((1 << n) - 1); ++mask)
    for (int i = 0; (i) < (n); ++i)
      if (((mask >> i) & 1) == 0) {
        double bet = M_PI - alp[i] - atan2(y[i], x[i] - d[mask]);
        double dist = sqrt((x[i] - d[mask]) * (x[i] - d[mask]) + y[i] * y[i]);
        double add = dist * sin(alp[i]) / sin(bet);
        if (bet < eps)
          d[mask | (1 << i)] = r;
        else
          d[mask | (1 << i)] = max(d[mask | (1 << i)], d[mask] + add);
      }
  double res = min((double)r, d[(1 << n) - 1]) - l;
  printf("%.10lf\n", res);
  return 0;
}
