a=int(input()) if a>=0 and a<=5: print("0") elif a>=6 and a<=11: print("590") elif a>=12 and a<=17: print("790") elif a>=18 and a<=59: print("890") elif a>=60: print("399")