clear; clc;

n = 1e6;
m = 0;

for i = 1 : n
    
    x = rand(1);
    y = rand(1);
    
    if x ^ 2 + y ^ 2 < 1
        m = m + 1;
    end
    
end

disp(4 * m / n);