N=int(input())
if N>=0 and N<=100: #確認輸入範圍
if N>=0 and N<=10: #計算分數(累加)
score=6*N
elif N>=11 and N<=20:
score=60+(N-10)*2
elif N>=21 and N<=40:
score=60+20+(N-20)*1
elif N>40: #40分以上都100分(當然也可以使用else:)
score=100
print(score) #輸出分數