N = input() array = [int(i) for i in input().split()] print(array[0]-1)