import java.util.*;
class Task3
{
public static void main
(String[] args
) {
int m, n;
double S = 0;
Scanner in
= new Scanner
(System.
in); m = in.nextInt();
n = in.nextInt();
for (int i = 1; i <= m; i++)
{
for (int j = 1; j <= n; j++)
{
S += 1.0/(i + j*j);
}
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwoKY2xhc3MgVGFzazMKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpCgl7CgkJaW50IG0sIG47CgkJZG91YmxlIFMgPSAwOwoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCW0gPSBpbi5uZXh0SW50KCk7CgkJbiA9IGluLm5leHRJbnQoKTsKCQlmb3IgKGludCBpID0gMTsgaSA8PSBtOyBpKyspCgkJewoJCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyBqKyspCgkJCXsKCQkJCVMgKz0gMS4wLyhpICsgaipqKTsKCQkJfQoJCX0KCQkKCQlTeXN0ZW0ub3V0LnByaW50bG4oUyk7Cgl9Cn0=