import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.math; import std.mathspecial; // allowable-error: 10 ** -5 void main() { auto n = readln.chomp.to!long; auto rd = readln.split.to!(long[]), l = rd[0], r = rd[1]; writefln("%.6f", n < 5000 ? calc1(n, l, r) : calc2(n, l, r)); } auto calc1(long n, long l, long r) { auto m = n * 6; auto dp = new real[][](n+1, m+1); foreach (ref dpi; dp) dpi[] = 0; dp[0][0] = 1; foreach (i; 1..n+1) foreach (j; 1..m+1) dp[i][j] = dp[i-1][max(0, j-6)..j].sum / 6; return dp[n][min(l, r)..min(m, r)+1].sum; } auto calc2(long n, long l, long r) { auto u = 7.0 / 2 * n, s2 = 35.0 / 12 * n; return (erf((r+0.5 - u) / sqrt(s2 * 2)) - erf((l-0.5 - u) / sqrt(s2 * 2))) / 2; }