#include <bits/stdc++.h>
using namespace std;
const int INF = ~0U >> 2;
double xx[22], yy[22], rad[22];
double l, r;
const double pi = acos(-1);
int n;
double dp[1 << 20];
int main() {
  scanf("%d%lf%lf", &n, &l, &r);
  int maxs = 1 << n;
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf%lf", &xx[i], &yy[i], &rad[i]);
    rad[i] = rad[i] / 180.0 * pi;
    if (yy[i] < 0) yy[i] = -yy[i];
  }
  double ans = -INF;
  dp[0] = l;
  for (int i = 1; i < maxs; i++) dp[i] = -999999.0;
  for (int i = 0; i < maxs; i++) {
    for (int j = 1; j <= n; j++) {
      if ((i & (1 << (j - 1))) == 0) {
        int next = i | (1 << (j - 1));
        double now = dp[i];
        double x = now - xx[j], y = -yy[j];
        double newx = x * cos(rad[j]) - y * sin(rad[j]),
               newy = x * sin(rad[j]) + y * cos(rad[j]);
        if (newy >= 0) {
          dp[next] = r;
          continue;
        }
        newx = newx * (y / newy) + xx[j];
        dp[next] = max(dp[next], newx);
      }
    }
    ans = max(ans, dp[i]);
  }
  printf("%.9lf\n", min(ans, r) - l);
  return 0;
}
