w=eval(input())
if w<=10:
x=w*0.32
print('{:.1f}'.format(x))
if 10<w<=20:
x=(w-10)*0.64+10*0.32
print('{:.1f}'.format(x))
if w>20:
x=(w-20)*0.96+10*0.64+10*0.32
print('{:.1f}'.format(x))
y=eval(input())
if y%100!=0&y%4==0 or y%400==0:
print('True')
else:
print('False')
currency_string = input()
USD_rate=6.78
unit = currency_string[-1]
def convert_currency(money,exchange_rate):
output = money * exchange_rate
return output
if unit == 'D':
exchange_rate = USD_rate
money = eval(currency_string[:-3])
x=money * exchange_rate
a = '{:.2f}'.format(x)
print(str(a)+'RMB')
if unit == '$':
exchange_rate = USD_rate
money2= eval(currency_string[:-1])
x=money2 * exchange_rate
a = '{:.2f}'.format(x)
print(str(a)+'¥')
if unit == 'B':
exchange_rate = 1/USD_rate
money = eval(currency_string[:-3])
x = money * exchange_rate
a='{:.2f}'.format(x)
print(str(a)+'USD')
if unit == '¥':
exchange_rate = 1/USD_rate
money2 = eval(currency_string[:-1])
x = money2 * exchange_rate
a='{:.2f}'.format(x)
print(str(a)+'$')