# 這是原程式,不過會卡在97%
m = int(input())
a,b=input().split()
a=int(a)
if b=="T":
y=m/1.0-a
elif b=="U":
y=m/30.9-a
elif b=="J":
y=m/0.28-a
else:
y=m/34.5-a
if y<0:
print("No Money")
elif y<0.05:
print(b,"0.00")
else:
print(b,"%.2f" %y)
# 嘗試用try來解除困境,可惜失敗了,希望路過的能幫忙看一下
m = input().replace('\r', ' ')
try:
n = input()
except:
a,b=n.split()
else:
m,a,b=m.split()
a=int(a)
m=int(m)
if b=="T":
y=m/1.0-a
elif b=="U":
y=m/30.9-a
elif b=="J":
y=m/0.28-a
else:
y=m/34.5-a
if y<0:
print("No Money")
elif y<0.05:
print(b,"0.00")
else:
print(b,"%.2f" %y)