import math

def fun(each):
	"""
    处理整数部分,按4位分割处理
    """
    each_desc = ''
    n = len(each)
    flag = True
    for i in range(n, 0, -1):
        if i == 4:
            if each[n-i] == '0' and each.count('0') != n:
                each_desc += '零'
                flag = False
            elif each[n-i] != '0':
                each_desc += money_dict[each[n-i]] + '仟'
        if i == 3:
            if each[n-i] == '0' and flag and each[n-i:].count('0') != i:
                each_desc += '零'
                flag = False
            elif each[n-i] != '0':
                each_desc += money_dict[each[n-i]] + '佰'
        if i == 2:
            if each[n-i] == '0' and flag and each[n-i:].count('0') != i:
                each_desc += '零'
                flag = False
            elif each[n-i] == '1':
                each_desc += '拾'
            elif each[n-i] != '0':
                each_desc += money_dict[each[n-i]] + '拾'
        if i == 1 and each[n-i] != '0':
            each_desc += money_dict[each[n-i]]
    return each_desc

while True:
    
    try:
        money_dict = {
            '1': '壹',
            '2': '贰',
            '3': '叁',
            '4': '肆',
            '5': '伍',
            '6': '陆',
            '7': '柒',
            '8': '捌',
            '9': '玖'
        }
        part1, part2 = input().split('.')
        part1_desc, part2_desc = '', ''
        
        if part1 != '0' and part2 == '00':
            part2_desc += '元整'
        else:
            if part1 != '0':
                part2_desc += '元'
            if part2[0] != '0':
                part2_desc += money_dict[part2[0]] + '角'
            if part2[1] != '0':
                part2_desc += money_dict[part2[1]] + '分'
        
        m = math.ceil(len(part1) / 4)
        n = len(part1)
        for i in range(m, 0, -1):
            if i == 3:
                part1_desc += fun(part1[: n % 4]) + '亿'
            if i == 2:
                if m == 3:
                    part1_desc += fun(part1[n % 4: n % 4 + 4]) + '万'
                if m == 2:
                    part1_desc += fun(part1[:-4]) + '万'
            if i == 1:
                if m > 1:
                    part1_desc += fun(part1[-4:])
                else:
                    part1_desc += fun(part1)
        
        print('人民币' + part1_desc + part2_desc)
    except:
        break