#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int x[22], y[22];
double alpha[22];
double dp[1 << 22];
double getR(double xx, double yy, double aa, double dd) {
  if (aa > (atan(yy / (dd - xx))) && dd > xx) return 1e9;
  double num = tan(aa) * (xx * xx + yy * yy - xx * dd) + yy * dd;
  double den = tan(aa) * (xx - dd) + yy;
  return num / den;
}
int main(int argc, char** argv) {
  int n, l, r;
  cin >> n >> l >> r;
  for (int i = 0; (i) < (n); ++i) {
    cin >> x[i] >> y[i] >> alpha[i];
    alpha[i] = (alpha[i] * pi) / 180.0;
  }
  int lim = 1 << n;
  double ans = l;
  for (int i = 0; (i) < (lim); ++i) dp[i] = l;
  for (int mask = 0; (mask) < (lim); ++mask) {
    for (int j = 0; (j) < (n); ++j)
      if (mask & (1 << j)) {
        double cur = getR(x[j], y[j], alpha[j], dp[mask - (1 << j)]);
        if (cur > r) cur = r;
        dp[mask] = max(dp[mask], cur);
      }
  }
  for (int mask = 0; (mask) < (lim); ++mask) ans = max(ans, dp[mask]);
  printf("%.19lf\n", ans - l);
  return 0;
}
