#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1.0);
double DEG_to_RAD(double d) { return d * PI / 180.0; }
double RAD_to_DEG(double r) { return r * 180.0 / PI; }
inline int cmp(double a, double b) {
  return (a < b - 1e-6) ? -1 : ((a > b + 1e-6) ? 1 : 0);
}
struct Point {
  double x, y;
  Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point operator*(double k) { return Point(x * k, y * k); }
  Point operator/(double k) { return Point(x / k, y / k); }
  double operator*(Point a) { return x * a.x + y * a.y; }
  double operator%(Point a) { return x * a.y - y * a.x; }
  int cmp(Point q) const {
    if (int t = ::cmp(x, q.x)) return t;
    return ::cmp(y, q.y);
  }
  bool operator>(Point q) const { return cmp(q) > 0; }
  bool operator<(Point q) const { return cmp(q) < 0; }
  bool operator==(Point q) const { return cmp(q) == 0; }
  bool operator>=(Point q) const { return cmp(q) >= 0; }
  bool operator<=(Point q) const { return cmp(q) <= 0; }
  bool operator!=(Point q) const { return cmp(q) != 0; }
  Point conj() { return Point(x, -y); }
  double norm() { return x * x + y * y; }
  double len() { return sqrt(norm()); }
  Point rotate(double alpha) {
    double cosa = cos(alpha), sina = sin(alpha);
    return Point(x * cosa - y * sina, x * sina + y * cosa);
  }
  void print() { cout << x << ' ' << y << endl; }
};
int ccw(Point a, Point b, Point c) { return cmp((b - a) % (c - a), 0); }
struct Line {
  double a, b, c;
  Point A, B;
  Line(double a, double b, double c) : a(a), b(b), c(c) {}
  Line(Point A, Point B) : A(A), B(B) {
    a = B.y - A.y;
    b = A.x - B.x;
    c = -(a * A.x + b * A.y);
  }
  Line(Point P, double m) {
    a = -m;
    b = 1;
    c = -((a * P.x) + (b * P.y));
  }
  double f(Point A) { return a * A.x + b * A.y + c; }
};
bool areParallel(Line l1, Line l2) {
  return cmp(l1.a * l2.b, l1.b * l2.a) == 0;
}
bool areSame(Line l1, Line l2) {
  return areParallel(l1, l2) && cmp(l1.c * l2.a, l2.c * l1.a) == 0 &&
         cmp(l1.c * l2.b, l1.b * l2.c) == 0;
}
bool areIntersect(Line l1, Line l2, Point &p) {
  if (areParallel(l1, l2)) return false;
  double dx = l1.b * l2.c - l2.b * l1.c;
  double dy = l1.c * l2.a - l2.c * l1.a;
  double d = l1.a * l2.b - l2.a * l1.b;
  p = Point(dx / d, dy / d);
  return true;
}
Point lights[22];
double angle[22], l, r;
int n;
double f[1 << 20];
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(NULL);
  cout << (fixed) << setprecision(9);
  while (cin >> n >> l >> r) {
    for (int i = 0, _a = (n); i < _a; i++) {
      cin >> lights[i].x >> lights[i].y >> angle[i];
      angle[i] = DEG_to_RAD(angle[i]);
    }
    for (int i = 0, _a = ((1 << (n))); i < _a; i++) f[i] = l;
    if (l == r) {
      cout << 0 << endl;
      continue;
    }
    Line ox(Point(l, 0), Point(r, 0));
    Point Q;
    for (int mask = 0, _a = ((1 << (n))); mask < _a; mask++) {
      for (int i = 0, _a = (n); i < _a; i++)
        if (!(mask & (1 << (i)))) {
          int newMask = mask + (1 << (i));
          Point P(f[mask], 0);
          P = (P - lights[i]).rotate(angle[i]) + lights[i];
          Line l(P, lights[i]);
          if (areIntersect(l, ox, Q)) {
            if (Q.x < f[mask]) Q.x = r + 1;
            f[newMask] = max(f[newMask], Q.x);
          } else {
            f[newMask] = r + 1;
          }
        }
    }
    double res = l;
    for (int mask = 0, _a = ((1 << (n))); mask < _a; mask++)
      res = max(res, f[mask]);
    res = min(res, r);
    cout << res - l << endl;
  }
  return 0;
}
