s = input() for _ in range(99): n = sum(int(c) for c in str(s)) print(n)