#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
double f[1100000];
int x[25], y[25], a[25];
int n, l, r;
inline double todegree(double rad) { return rad / M_PI * 180.0; }
inline double torad(double deg) { return deg / 180.0 * M_PI; }
inline bool iseql(double a, double b) { return abs(a - b) <= eps; }
double calc(int stat) {
  if (stat == 0) return l;
  if (f[stat] != 0) return f[stat];
  double ans = l;
  double temp;
  double ang;
  double rem;
  for (int i = 0; i < n; ++i) {
    if (stat & (1 << i)) {
      temp = calc(stat & (~(1 << i)));
      ang = todegree(atan2(x[i] - temp, y[i]));
      if (ang < 0) {
        rem = a[i] - ang;
        if (rem >= 90) return f[stat] = r;
        temp = x[i] + y[i] * tan(torad(rem));
      } else {
        rem = a[i] - ang;
        temp = x[i] + y[i] * tan(torad(rem));
      }
      if (temp > ans) ans = temp;
    }
  }
  return f[stat] = ans;
}
int main() {
  cin >> n >> l >> r;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i] >> a[i];
  calc((1 << n) - 1);
  cout.precision(10);
  cout << (f[(1 << n) - 1] > r ? (double)(r - l) : f[(1 << n) - 1] - l) << endl;
  return 0;
}
