
def consecutiveNumbersSum(N):
        # 2N = k(2x + k + 1)
    ans = 0
    for k in range(1, 2*N + 1):
        if 2*N % k == 0:
            y = 2 * N / k - k - 1
            if y % 2 == 0 and y >= 0:
                ans += 1
    return ans
n=int(input())
print(consecutiveNumbersSum(n))

a6123df3a6e94a725dc2537e773e84b136f3ba2b
<mask token>

def consecutiveNumbersSum(N):
    ans = 0
    for k in range(1, 2 * N + 1):
        if 2 * N % k == 0:
            y = 2 * N / k - k - 1
            if y % 2 == 0 and y >= 0:
                ans += 1
    return ans


<mask token>

def consecutiveNumbersSum(N):
    ans = 0
    for k in range(1, 2 * N + 1):
        if 2 * N % k == 0:
            y = 2 * N / k - k - 1
            if y % 2 == 0 and y >= 0:
                ans += 1
    return ans


<mask token>
print(consecutiveNumbersSum(n))

def consecutiveNumbersSum(N):
    ans = 0
    for k in range(1, 2 * N + 1):
        if 2 * N % k == 0:
            y = 2 * N / k - k - 1
            if y % 2 == 0 and y >= 0:
                ans += 1
    return ans


n = int(input())
print(consecutiveNumbersSum(n))


def consecutiveNumbersSum(N):
        # 2N = k(2x + k + 1)
    ans = 0
    for k in range(1, 2*N + 1):
        if 2*N % k == 0:
            y = 2 * N / k - k - 1
            if y % 2 == 0 and y >= 0:
                ans += 1
    return ans
n=int(input())
print(consecutiveNumbersSum(n))
