#54031: python的解(極簡版)


epcl4ek@gmail.com (李豪紳)


#輸入題數
num=int(input())
#1~10題,6分/題
if 10>=num>=0 :
    score=num*6
#11~20題,2分/題
elif num <20:
    n1=num-10
#這裡直接將錢時題總分加總後,再加上11~20題的得分
    score=60+n1*2
#21~40題,1分/題
elif 40>num:
    n2=num-20
#這裡直接將錢時題總分加總後,再加上21~40題的得分
    score=80+n2*1
#40題以上,一律100分
else:
    score=100
print(int(score))    
'''井字號為說明,做題時請自行思考
切勿依賴答案'''