def sum_divisors(n):
    """
    Returns a sum of numbers proper divisors.
    For exsample sum_divisors(28) = 1 + 2 + 4 + 7 + 14 = 28
    """
    s = 1
    limit = int(n ** 0.5)
    if limit ** 2 == n:
        s += limit
        limit -= 1
    for i in range(2, limit + 1):
        if n % i == 0:
            s += (i + n // i)
    return s