#include <bits/stdc++.h>
const double pi = 3.14159265358979;
using namespace std;
double r, l;
double dp[1 << 20];
double mx[21];
double my[21];
double angle[21];
double max(double x, double y) { return x > y ? x : y; }
double s(double x1, double y1, double x2, double angle) {
  double alpha = pi / 2 - atan2(y1, x1 - x2);
  if (angle - alpha >= pi / 2)
    return r;
  else
    return x2 + y1 * (tan(alpha) + tan(angle - alpha));
}
int main() {
  int n;
  cin >> n >> l >> r;
  for (int i = 0; i < n; i++) cin >> mx[i] >> my[i] >> angle[i];
  for (int i = 0; i < n; i++) angle[i] = 2 * pi * angle[i] / 360;
  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))) {
        dp[i] = max(dp[i], s(mx[j], my[j], dp[i - (1 << j)], angle[j]));
      }
    }
  }
  double res = ((r < dp[((1 << n) - 1)]) ? (r - l) : (dp[(1 << n) - 1] - l));
  printf("%.10lf", res);
  return 0;
}
