N = int(input()) AB = [list(map(int,input().split())) for i in range(N)] a = 0 for i in range(N) : a += AB[1] print(a+1)