#include <bits/stdc++.h>
using namespace std;
const int M = 22, Inf = 1e9 + 10;
double dp[1 << M], x[M], y[M], a[M], l, r;
int n;
double calc(int idx, double s) {
  double beta = a[idx] * M_PI / 180 - atan((x[idx] - s) / y[idx]);
  if (beta >= M_PI_2) return r;
  return x[idx] + tan(beta) * y[idx];
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> l >> r;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i] >> a[i];
  dp[0] = l;
  for (int i = 0; i < (1 << n); dp[++i] = l)
    for (int x = 0; x < n; x++)
      if (i & (1 << x)) dp[i] = min(r, max(calc(x, dp[i - (1 << x)]), dp[i]));
  printf("%.9f\n", dp[(1 << n) - 1] - l);
  return 0;
}
