2022212 - 商店结算

n = int(input()) if n <= 8:

print(n * 0.8)

else:

print( 8 * 0.8 + (n - 8) * 0.7 )