#include <bits/stdc++.h>
using namespace std;
const int maxN = 20 + 5;
const int maxS = 1 << 20;
const double pi = acos(-1);
const double EPS = 1e-9;
const double INF = 1e9;
struct LIGHT {
  int x, y;
  double alpha;
} a[maxN];
double f[maxS];
int vis[maxS];
int N, L, R;
double calc(double x, LIGHT a) {
  double beta = atan2(a.y, a.x - x);
  if (beta + a.alpha > pi - EPS) return R;
  double k = tan(a.alpha + beta);
  return min((double)R, -a.y / k + a.x);
}
int main() {
  cin >> N >> L >> R;
  for (int i = 0; i < N; ++i) {
    cin >> a[i].x >> a[i].y >> a[i].alpha;
    a[i].alpha = a[i].alpha * pi / 180;
  }
  for (int i = 0; i < 1 << N; ++i) f[i] = -INF;
  queue<int> que;
  que.push(0);
  f[0] = L;
  vis[0] = 1;
  while (!que.empty()) {
    int x = que.front();
    que.pop();
    for (int i = 0; i < N; ++i) {
      if (1 << i & x) continue;
      int y = 1 << i | x;
      f[y] = max(f[y], calc(f[x], a[i]));
      if (!vis[y]) {
        vis[y] = 1;
        que.push(y);
      }
    }
  }
  printf("%.10lf\n", f[(1 << N) - 1] - L);
  return 0;
}
