a = int(input())b = 0
if a <= 10: b = a * 6if 20 >= a and a > 10: b = (a-10) * 2 +60if a > 20 and a <= 40: b = 80 + a-20if a > 40: b = 100
print(b)