#include <bits/stdc++.h>
using namespace std;
const double pi = atan(1.0) * 4, eps = 1e-8;
const int N = 22;
double l, r, x[N], y[N], alpha[N], dp[1 << 20 | 12];
int n;
double move(double x, double y, double B) {
  double C = atan2(y, x);
  double A = pi - B - C;
  if (A < eps) return r;
  double a = sqrt(x * x + y * y);
  return a / sin(A) * sin(B);
}
int main() {
  scanf("%d%lf%lf", &n, &l, &r);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf", &x[i], &y[i], &alpha[i]);
    alpha[i] *= pi / 180;
  }
  int all = 1 << n;
  for (int s = 0; s < all; s++) dp[s] = l;
  for (int s = 0; s < all; s++) {
    for (int i = 0; i < n; i++)
      if (!(s >> i & 1)) {
        dp[s | 1 << i] =
            max(dp[s | 1 << i], dp[s] + move(x[i] - dp[s], y[i], alpha[i]));
        if (dp[s | 1 << i] >= r) {
          printf("%.12f\n", r - l);
          return 0;
        }
      }
  }
  printf("%.9f\n", dp[all - 1] - l);
  return 0;
}
