#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const double pi = 2 * asin(1.0);
int n;
int m;
int l, r;
int x[20];
int y[20];
double ang[20];
double cosa[20];
double sina[20];
double res[1 << 20];
int main() {
  scanf("%d%d%d", &n, &l, &r);
  for (int i = 0; i < n; i++) {
    int c;
    scanf("%d%d%d", &x[i], &y[i], &c);
    ang[i] = c / 180.0 * pi;
    cosa[i] = cos(ang[i]);
    sina[i] = sin(ang[i]);
  }
  for (int i = 0; i < (1 << n); i++) res[i] = -1e9;
  res[0] = l;
  for (int i = 0; i < (1 << n); i++) {
    double cur = res[i];
    for (int j = 0; j < n; j++)
      if (((i >> j) & 1) == 0) {
        double xx = (cur - x[j]) * cosa[j] - (0 - y[j]) * sina[j] + x[j];
        double yy = (cur - x[j]) * sina[j] + (0 - y[j]) * cosa[j] + y[j];
        double tmp = r;
        if (yy < y[j] - 1e-6)
          tmp = min(tmp, x[j] + (xx - x[j]) / (y[j] - yy) * y[j]);
        res[i + (1 << j)] = max(res[i + (1 << j)], tmp);
      }
  }
  printf("%.10f\n", res[(1 << n) - 1] - l);
  return 0;
}
