def my_func(num): co = 0 for i in range(1, int(num) + 1): res = [] for k in range(1, i): if i % k == 0: res.append(k) if sum(res) == i: co += 1 print(co) while True: try: my_func(input()) except (EOFError, KeyboardInterrupt): break
def my_func(num): co = 0 for i in range(1, int(num) + 1): res = [] for k in range(1, i): if i % k == 0: res.append(k) if sum(res) == i: co += 1 print(co) while True: try: my_func(input()) except (EOFError, KeyboardInterrupt): break