input() print(sum(map(int ,input())))
n = int(input()) strl = input() total = 0 for i in range(n): total += int(strl[i]) print(total)