import java.io.*;
class Main
{
public static void main
(String args
[]) { int n = 10000000;
double s = 0;
for(int i = 0; i < n; i++) {
double x
= Math.
random(); double y
= Math.
random(); if((x*x+y*y) < 1.0) {
s += 1.0;
}
}
}
}
aW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIE1haW4KewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nIGFyZ3NbXSkgewogICAgICAgIGludCBuID0gMTAwMDAwMDA7CiAgICAgICAgZG91YmxlIHMgPSAwOwogICAgICAgIGZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKICAgICAgICAgICAgZG91YmxlIHggPSBNYXRoLnJhbmRvbSgpOwogICAgICAgICAgICBkb3VibGUgeSA9IE1hdGgucmFuZG9tKCk7CiAgICAgICAgICAgIGlmKCh4KngreSp5KSA8IDEuMCkgewogICAgICAgICAgICAgICAgcyArPSAxLjA7CiAgICAgICAgICAgIH0KICAgICAgICB9IAogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbig0LjAqcy9uKTsKICAgIH0KfQ==