#include <bits/stdc++.h>
using namespace std;
int x[25], y[25];
int N, l, r;
double dp[1 << 20], a[25];
int main() {
  scanf("%d %d %d", &N, &l, &r);
  for (int c = 0; c < N; c++) {
    scanf("%d %d %lf", &x[c], &y[c], &a[c]);
    a[c] = a[c] / 180 * M_PI;
  }
  for (int c = 0; c < 1 << N; c++) dp[c] = l;
  for (int c = 0; c < 1 << N; c++) {
    for (int d = 0; d < N; d++) {
      if ((c & (1 << d)) == 0) {
        double zeta = (x[d] == dp[c]) ? M_PI / 2 : atan(y[d] / (x[d] - dp[c]));
        if (zeta < 0) zeta += M_PI;
        if (a[d] + zeta >= M_PI) {
          printf("%lf\n", double(r - l));
          return 0;
        }
        double to = x[d] - y[d] / tan(zeta + a[d]);
        if (to > r) {
          printf("%lf\n", double(r - l));
          return 0;
        }
        dp[c | (1 << d)] = max(dp[c | (1 << d)], to);
      }
    }
  }
  printf("%lf\n", dp[(1 << N) - 1] - l);
}
