#include <bits/stdc++.h>
using namespace std;
struct neon {
  double x, y, a;
} d[25];
double dp[1 << 20];
double cal(double lf, double rg, int po) {
  double angle = d[po].a - atan((d[po].x - lf) / d[po].y);
  double v;
  if (angle >= M_PI_2)
    v = tan(M_PI_2);
  else
    v = tan(angle);
  v = v * d[po].y + d[po].x;
  if (v >= rg)
    return rg;
  else
    return v;
}
int main() {
  int n;
  double l, r, ans = 0;
  scanf("%d%lf%lf", &n, &l, &r);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf", &d[i].x, &d[i].y, &d[i].a);
    d[i].a = d[i].a * M_PI / 180;
  }
  int N = 1 << n;
  dp[0] = l;
  for (int i = 1; i < N; i++) dp[i] = -1000000;
  for (int i = 0; i < N; i++)
    for (int k1 = 0, k2 = 1; k1 < n; k1++, k2 *= 2)
      if ((k2 & i) == 0) dp[i + k2] = max(dp[i + k2], cal(dp[i], r, k1));
  printf("%.10lf", dp[N - 1] - l);
}
