N = int(input()) ans = 0 for i in range(1, N): b = N % i if b == 0: b = i a = (N - b) // i - b if a <= 0: break c = - N % (i + 1) if c == 0: c = i + 1 d = (N + c) // (i + 1) - c if d <= 0: break ans += (a + b) - (c + d) + 1 print(ans)