using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[] NMi => ReadLine().Split().Select(c => int.Parse(c) - 1).ToArray(); static int[][] NMap(int n) => Enumerable.Repeat(0, n).Select(_ => NMi).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var p = NList; var (l, r) = (p[0], p[1]); var list = new List(); list.Add(FD(c, l)); list.Add(FD(c, r)); if (c[3] != 0) { var rt = 4 * c[2] - 12 * c[1] * c[3]; if (rt == 0) { list.Add(FD(c, -c[2] / 3.0 / c[3])); } else if (rt > 0) { var sq = Math.Sqrt(rt); list.Add(FD(c, (-2 * c[2] + sq) / 6 / c[3])); list.Add(FD(c, -(2 * c[2] + sq) / 6 / c[3])); } } else if (c[2] != 0) { list.Add(FD(c, - c[1] / 2.0 / c[2])); } list.Sort(); if (list[0] < 0 && list[^1] > 0) WriteLine(0); else WriteLine(list.Select(Math.Abs).Min()); } static double FD(int[] c, double x) { return c[0] + c[1] * x + c[2] * x * x + c[3] * x * x * x; } }