#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int n, l, r;
double x[30], y[30], a[30];
double dp[3097152];
queue<int> q;
bool inq[3000000];
const double pi =
    3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170680;
inline double len(double l0, int t) {
  double ca = cos(a[t] * pi / 180.0);
  double sa = sin(a[t] * pi / 180.0);
  double ll = sqrt((x[t] - l - l0) * (x[t] - l - l0) + y[t] * y[t]);
  double cb = (x[t] - l - l0) / ll;
  double sb = sqrt(1.0 - cb * cb);
  double sc = sa * cb + ca * sb;
  if (sc < eps) return r - l;
  return l0 + ll * sa / sc;
}
inline void expa(const int& foo) {
  for (int i = 0; i < n; i++) {
    int temp = foo | (1 << i);
    if (temp != foo) {
      double templ = len(dp[foo], i);
      if ((templ - dp[temp]) > -eps) {
        dp[temp] = templ;
        if (inq[temp] == false) {
          q.push(temp);
          inq[temp] = true;
        }
      }
    }
  }
}
int main() {
  while (scanf("%d%d%d", &n, &l, &r) != EOF) {
    memset(inq, 0, sizeof(inq));
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i < n; i++) scanf("%lf%lf%lf", &x[i], &y[i], &a[i]);
    q.push(0);
    inq[0] = 1;
    while (!q.empty()) {
      expa(q.front());
      inq[q.front()] = 0;
      q.pop();
    }
    int temp = 0;
    for (int i = 1; i <= n; i++) temp = temp * 2 + 1;
    printf("%.30lf\n", min(double(r - l), dp[temp]));
  }
  return 0;
}
