birth_year = int(input()) print(2017 - birth_year)