#include <bits/stdc++.h>
using namespace std;
FILE *in;
FILE *out;
const int MAX = 20;
const int MASK = 1048576;
const int INF = 1000000001;
const double EPS = 0.0000000001;
const double PI = 3.1415926535897932;
const double CONV = 0.01745329251994329576923690768489;
struct Light {
  double x, y;
  double angle;
};
int n, l, r;
Light a[MAX];
double best[MASK];
double sameCase(int idx, double p) {
  double offY = a[idx].y;
  if (a[idx].angle >= PI / 2.0 - EPS) return INF;
  double gamma = PI / 2.0 - a[idx].angle;
  return p + offY * sin(a[idx].angle) / sin(gamma);
}
double leftCase(int idx, double p) {
  double offX = p - a[idx].x;
  double offY = a[idx].y;
  double beta = atan2(offX, offY);
  if (beta + a[idx].angle >= PI / 2.0 - EPS) return INF;
  double angle = PI - atan2(offY, offX);
  double gamma = PI - a[idx].angle - angle;
  double d = sqrt(offX * offX + offY * offY);
  return p + d * sin(a[idx].angle) / sin(gamma);
}
double rightCase(int idx, double p) {
  double offX = a[idx].x - p;
  double offY = a[idx].y;
  double angle = atan2(offY, offX);
  double gamma = PI - a[idx].angle - angle;
  double d = sqrt(offX * offX + offY * offY);
  return p + d * sin(a[idx].angle) / sin(gamma);
}
double eval(int idx, double p) {
  if (fabs(a[idx].x - p) < EPS) {
    return sameCase(idx, p);
  }
  return a[idx].x < p ? leftCase(idx, p) : rightCase(idx, p);
}
double solve() {
  vector<pair<int, int> > order;
  for (int mask = 0; mask < (1 << n); mask++)
    order.push_back(make_pair(__builtin_popcount(mask), mask));
  sort(order.begin(), order.end());
  for (int i = 0; i < MASK; i++) best[i] = l;
  for (int iter = 0; iter < (int)order.size(); iter++) {
    int mask = order[iter].second;
    for (int i = 0; i < n; i++)
      if (!(mask & (1 << i))) {
        int nmask = (mask | (1 << i));
        double nreach = eval(i, best[mask]);
        if (best[nmask] < nreach) best[nmask] = nreach;
      }
  }
  double ans = -INF;
  for (int i = 0; i < MASK; i++) ans = max(ans, best[i]);
  return min((double)r, ans) - l;
}
int main(void) {
  in = stdin;
  out = stdout;
  fscanf(in, "%d %d %d", &n, &l, &r);
  for (int i = 0; i < n; i++) {
    fscanf(in, "%lf %lf %lf", &a[i].x, &a[i].y, &a[i].angle);
    a[i].angle *= CONV;
  }
  fprintf(out, "%.9lf\n", solve());
  return 0;
}
