#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-13;
bool vis[1 << 20];
long double dp[1 << 20];
int n, l, r;
int light[20][3];
long double dist(long double x1, long double y1, long double x2,
                 long double y2) {
  x1 -= x2;
  y1 -= y2;
  return sqrtl(x1 * x1 + y1 * y1);
}
long double caldis(int num, long double from) {
  long double x = light[num][0], y = light[num][1];
  long double ang = (long double)light[num][2] / (long double)180 * acosl(-1.0);
  long double bet = atan2l(y, x - from);
  if (bet < 0) {
    bet += acosl(-1);
  }
  bet = acosl(-1) - bet - ang;
  if (bet <= eps) return r;
  return sinl(ang) * dist(x, y, from, 0) / sinl(bet);
}
long double cal(int msk) {
  if (!vis[msk]) {
    vis[msk] = true;
    dp[msk] = -1e100;
    for (int i = 0; (1 << i) <= msk; ++i)
      if ((1 << i) & msk) {
        long double dis = cal(msk ^ (1 << i));
        dis += caldis(i, dis);
        dp[msk] = max(dp[msk], dis);
      }
  }
  return dp[msk];
}
int main() {
  scanf("%d%d%d", &n, &l, &r);
  for (int i = (0); i < (n); ++i)
    scanf("%d%d%d", &light[i][0], &light[i][1], &light[i][2]);
  vis[0] = true;
  dp[0] = l;
  double dis = cal((1 << n) - 1) - l;
  if (dis > r - l) dis = r - l;
  printf("%.7lf", dis);
  return 0;
}
