print(sum([sum([int(i) for i in input()]) for _ in range(int(input()))]))