# L-10.5 MCS 260 Wed 9 Jul 2014 : q06.py
"""
Give Python code to convert strings like "34 dollar" and "1.23 dollar"
into "$34" and "$1.23". The number in front of the dollar can be of any size.
"""
INPUT = raw_input('give a string : ')
SPLITTED = INPUT.split(' ')
AMOUNT = float(SPLITTED[0])
if float(int(AMOUNT)) == AMOUNT:
    FORMATTED = '%d' % int(AMOUNT)
else:
    FORMATTED = '%.2f' % AMOUNT
OUTPUT = '$' + FORMATTED
print OUTPUT
