#include <bits/stdc++.h>
using namespace std;
int n;
double l, r;
double x[30], y[30], a[30];
double dp[1 << 21];
int main() {
  scanf("%d %lf %lf", &n, &l, &r);
  for (int i = 0; i < n; ++i)
    scanf("%lf %lf %lf", &x[i], &y[i], &a[i]), a[i] *= M_PI / 180.0, x[i] -= l;
  r -= l;
  l = 0;
  for (int i = 0; i < (1 << n); ++i) dp[i] = l;
  for (int i = 0; i < (1 << n); ++i)
    for (int j = 0; j < n; ++j)
      if ((i & (1 << j)) == 0) {
        double b = atan((dp[i] - x[j]) / y[j]) + a[j];
        if (b >= M_PI / 2)
          dp[i | (1 << j)] = r - l;
        else
          dp[i | (1 << j)] = max(dp[i | (1 << j)], x[j] + y[j] * tan(b));
      }
  printf("%0.8lf\n", min(r - l, dp[(1 << n) - 1]));
}
