#include <bits/stdc++.h>
using namespace std;
double maxx(double a, double b) { return a > b ? a : b; }
int minn(int a, int b) { return a < b ? a : b; }
int abss(int a) { return a < 0 ? (-a) : a; }
const double eps = 1e-8, PI = 3.141592653589, INF = 1e7;
int N;
double L, R;
double inpt[30][3];
double dp[1 << 20];
double DP(int, double);
double Get(int, double);
int main() {
  scanf("%d%lf%lf", &N, &L, &R);
  double ans = L;
  for (int i = 0; i < 1 << N; i++) dp[i] = -INF;
  dp[0] = L;
  for (int i = 1; i <= N; i++)
    scanf("%lf%lf%lf", &inpt[i][0], &inpt[i][1], &inpt[i][2]);
  for (int mask = 0; mask < 1 << N; mask++) {
    ans = maxx(dp[mask], ans);
    if (ans > R) {
      ans = R;
      break;
    }
    for (int np = 1; np <= N; np++) {
      int nxt = 1 << np - 1;
      if (mask & nxt) continue;
      dp[mask | nxt] = maxx(dp[mask | nxt], dp[mask] + Get(np, dp[mask]));
    }
  }
  printf("%.8f\n", ans - L);
  return 0;
}
double Get(int i, double stp) {
  double x1 = inpt[i][0];
  double y1 = inpt[i][1];
  double ang = inpt[i][2] * PI / 180;
  double dist = sqrt(y1 * y1 + (x1 - stp) * (x1 - stp));
  double ang2 = acos((x1 - stp) / dist);
  ang2 = PI - ang2 - ang;
  double s = dist * sin(ang);
  if (ang2 < eps)
    s = INF;
  else
    s /= sin(ang2);
  return s;
}
