years = input() y_old =(2000-years)+17 print y_old