N = int(input()) x = 0 for i in range(N): a, b = map(int, input().split()) x = x + b print(x + 1)