import random


def mcpi_samples(n):
    """
    Compute the number of points in the unit circle out of n points.
    """
    count = 0
    for i in range(n):
        x, y = random.random(), random.random()
        if x*x + y*y <= 1:
            count += 1
    return count