a,b=input().split() a=float(a) j=0 if a % 1 !=0: a=a//1+1 if a <= 1: j=20 else: j=20+(a-1)*1 if b=='y': j=j+5 j=int(j) print(j)