s=[int(input()) for i in input() if input().isdigit()] print(sum(s))