#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
const long long mod = 1e9 + 7;
int main() {
  int n;
  double l, r;
  cin >> n >> l >> r;
  int all = 1 << n;
  double x[n], y[n], d[n], pi = acos(-1);
  for (int i = (int)0; i < (int)n; ++i) {
    cin >> x[i] >> y[i] >> d[i];
    d[i] = d[i] * pi / 180;
  }
  double dp[all];
  for (int i = (int)0; i < (int)all; ++i) dp[i] = l;
  for (int mask = (int)0; mask < (int)all; ++mask) {
    for (int i = (int)0; i < (int)n; ++i) {
      if (((1 << i) & mask) == 0) continue;
      double left = dp[mask ^ (1 << i)];
      double t = atan2(y[i], x[i] - left);
      double res = pi - t - d[i];
      if (res <= 0)
        dp[mask] = r;
      else {
        double right =
            left + sqrt(y[i] * y[i] + (x[i] - left) * (x[i] - left)) /
                       sin(res) * sin(d[i]);
        right = min(r, right);
        dp[mask] = max(dp[mask], right);
      }
    }
  }
  cout << fixed << setprecision(10) << dp[all - 1] - l << endl;
  return 0;
}
