x = input() y = list(x) z = list(map(int, y)) a = 0 for i in z: a += i print(a)