def num2chinese(num):
chinese_num = ['零','壹','贰','叁','肆','伍','陆','柒','捌','玖']
chinese_unit = ['分','角','元','拾','佰','仟','万','亿']
integer_part, decimal_part = str(num).split('.')
integer_part = integer_part[::-1]
res = ''
# 处理小数部分
if decimal_part != '00':
res += chinese_num[int(decimal_part[1])] + chinese_unit[1] + chinese_num[int(decimal_part[0])] + chinese_unit[0]
else:
res += '零' + chinese_unit[0]
# 处理整数部分
for i in range(len(integer_part)):
if integer_part[i] == '0':
if i == 0 or (i+4)%8 == 0:
res += chinese_num[0]
else:
res += chinese_num[int(integer_part[i])] + chinese_unit[(i+3)%8]
if (i+4)%8 == 0:
res += chinese_unit[6]
if i == 7:
break
# 去掉末尾的“零”
while res[-1] == '零':
res = res[:-1]
# 加上“元”和“整”
if res[-1] == '元':
res += '整'
else:
res += '元'
return res[::-1]
num = float(input())
print('大写金额:{}'.format(num2chinese(num)))