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