#include <bits/stdc++.h>
using namespace std;
double l, r, x[20], y[20], a[20], dp[(1 << 20)];
int n;
double deal(double x0, int i) {
  double temp = atan((r - x[i]) / y[i]);
  temp = min(temp, atan((x0 - x[i]) / y[i]) + a[i]);
  return x[i] + y[i] * tan(temp);
}
int main() {
  while (~scanf("%d%lf%lf", &n, &l, &r)) {
    r -= l;
    for (int i = 0; i < n; i++)
      scanf("%lf%lf%lf", &x[i], &y[i], &a[i]), x[i] -= l,
          a[i] = a[i] / 180. * acos(-1.0);
    memset(dp, 0, sizeof(dp));
    int N = 1 << n;
    for (int i = 0; i < N; i++)
      for (int j = 0; j < n; j++)
        if ((i & (1 << j)) == 0)
          dp[i ^ (1 << j)] = max(dp[i ^ (1 << j)], deal(dp[i], j));
    printf("%.10f\n", dp[N - 1]);
  }
  return 0;
}
