Y = int(input()) now_y = 2017 age = now_y - Y print(age)