#include <bits/stdc++.h>
using namespace std;
const double p = acos(-1.0);
double dp[1 << 21];
int n;
double l, r;
struct node {
  double x, y, di;
} q[22];
int main() {
  while (scanf("%d %lf %lf", &n, &l, &r) != EOF) {
    for (int i = 0; i < n; i++) {
      scanf("%lf %lf %lf", &q[i].x, &q[i].y, &q[i].di);
    }
    int st = 1 << n;
    for (int i = 0; i < st; i++) {
      dp[i] = -9999999.0;
    }
    dp[0] = l;
    for (int i = 0; i < st; i++) {
      for (int j = 0; j < n; j++) {
        if (((1 << j) & i) == 0) {
          int sta = i | (1 << j);
          double x = dp[i] - q[j].x;
          double y = -q[j].y;
          double a = x * cos(p * q[j].di / 180) - y * sin(p * q[j].di / 180);
          double b = x * sin(p * q[j].di / 180) + y * cos(p * q[j].di / 180);
          if (b >= 0) {
            dp[sta] = r;
            continue;
          }
          double tmp = y * a / b + q[j].x;
          dp[sta] = max(dp[sta], tmp);
        }
      }
    }
    printf("%.10lf\n", min(r, dp[st - 1]) - l);
  }
  return 0;
}
