Snuke prepared 6 problems for a upcoming programming contest. For each of those problems, Rng judged whether it can be used in the contest or not.  You are given a string S of length 6. If the i-th character of s is `1`, it means that the i-th problem prepared by Snuke is accepted to be used; `0` means that the problem is not accepted.  How many problems prepared by Snuke are accepted to be used in the contest?
a = map(int, input().split())
a = list(a)

ans = 0
for i in a:
    ans += i
print(ans)

s = input()
ans = 0
for i in range(len(s)):
    if(s[i] == '1'):
        ans += 1
print(ans)
