#include <bits/stdc++.h>
using namespace std;
const int Maxn = 20;
const long double pi = acos(-1.0l);
const long double eps = 1e-6l;
int n, l, r;
long double lim;
int X[Maxn], Y[Maxn], A[Maxn];
long double dist[1 << Maxn];
long double Dot(long double ax, long double ay, long double bx,
                long double by) {
  return ax * bx + ay * by;
}
long double Len(long double ax, long double ay) {
  return sqrt(ax * ax + ay * ay);
}
long double nPoint(long double x, int lig) {
  long double ax = X[lig] - (l + x), ay = Y[lig] - 0;
  long double bx = 1, by = 0;
  long double alen = Len(ax, ay);
  long double ang = acos(Dot(ax, ay, bx, by) / alen);
  long double my = A[lig] / 180.0 * pi;
  long double lft = pi - my - ang;
  if (lft < eps) return lim;
  long double dist = sin(my) * alen / sin(lft);
  return min(x + dist, lim);
}
int main() {
  scanf("%d %d %d", &n, &l, &r);
  lim = r - l;
  for (int i = 0; i < n; i++) scanf("%d %d %d", &X[i], &Y[i], &A[i]);
  dist[0] = 0.0;
  for (int i = 1; i < 1 << n; i++)
    for (int j = 0; j < n; j++)
      if (i & 1 << j) dist[i] = max(dist[i], nPoint(dist[i ^ 1 << j], j));
  printf("%.10lf\n", (double)dist[(1 << n) - 1]);
  return 0;
}
