Y = int(raw_input()) print Y-2017