#a053. Sagit's 計分程式a = int(input())if a>40: print(100)else: if a<=10: print(a*6) elif a<=20: print((a-10)*2+60) elif a<=40: print((a-20)+80)