n = int(input()) print(age = 2017 - n)