opt = list(input().split())
weight = float(opt[0])
n = str(weight).split('.')[1]
m = str(weight).split('.')[0]
if weight <= 1 and opt[1] == 'y':
money = 25
if weight <= 1 and opt[1] == 'n':
money = 20
if weight > 1 and opt[1] == 'y':
if int(n) == 0:
money = 25 + (weight - 1)
if int(n) > 0:
money = 25 + (int(m)-1) + 1
if weight > 1 and opt[1] == 'n':
if int(n) == 0:
money = 20 + (weight - 1)
if int(n) > 0:
money = 20 + (int(m)-1) + 1
print('%.f' % float(money))