/*
**写的比较凌乱,整体思路是四位为一体
*/
import java.text.DecimalFormat;
import java.util.Scanner;
public class ConvertMoney {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
double d=sc.nextDouble();
String s=conver(d);
System.out.println(s);
}
private static String conver(double d) {
String[]c={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
String[]c2={"元","拾","佰","千"};
String[]c3={"万","亿"};
String[]c4={"角","分"};
//System.out.println(c);
String name;
String temp;
StringBuffer sb = new StringBuffer();
sb.append("人民币");
DecimalFormat decimalFormat = new DecimalFormat("0.00");
String str=decimalFormat.format(d);
String st[]=str.split("\\.");
// System.out.println(st[1]);
int i=0;
int len=st[0].length();
int account = -1;
if(len>=5&&len<9)account=0;
if(len>=9&&len<12)account=1;
//System.out.println(st[0]);
if(len==1&&st[0].charAt(0)=='0'){
name="";
temp="";
}else{
for(i=0;i<len;i++){
int j=len-i-1;
int k=st[0].charAt(i)-'0';
//第i个元素为0元,判断是不是最后元素以及判断i+1是否也为0
if(st[0].charAt(i)=='0'){
if(i==len-1){name="";temp=c2[j%4];}
else if(st[0].charAt(i+1)=='0'){
name="";
temp="";
}else{
name=c[k];
temp="";
}
}else{
name=c[k];
if(j%4==0&&j!=0){
temp="";
}
else{
temp=c2[j%4];
}
}
sb.append(name);
sb.append(temp);
//System.out.println(sb);
if(j%4==0){
if(account!=-1){
sb.append(c3[account]);
account--;
}
}
}
}
//处理小数部分
int len1=st[1].length();
int j=0;
while(j<2){
if(st[1].charAt(0)=='0'&&st[1].charAt(1)=='0'){
sb.append("整");
break ;
}
int k1=st[1].charAt(j)-'0';
if(st[1].charAt(j)=='0'){
j++;
}else{
name=c[k1];
temp=c4[j];
j++;
sb.append(name);
sb.append(temp);
}
}
String s=sb.toString();
return s;
}
}