import java.util.Scanner;
public class Money {
public static void main(String [] args) {
System.out.print("µ·ÀÇ ¾×¼ö ÀÔ·Â: ");
Scanner scanner = new Scanner(System.in);
int totalmoney = scanner.nextInt();
int F = totalmoney/50000;
int Tt = (totalmoney-F*50000)/10000;
int Th = (totalmoney-F*50000-Tt*10000)/1000;
int Fh = (totalmoney-F*50000-Tt*10000-Th*1000)/500;
int H = (totalmoney-F*50000-Tt*10000-Th*1000-Fh*500)/100;
int T = (totalmoney-F*50000-Tt*10000-Th*1000-Fh*500-H*100)/10;
int O = totalmoney-F*50000-Tt*10000-Th*1000-Fh*500-H*100-T*10;
System.out.println("5¸¸¿ø±Ç "+F+"Àå");
System.out.println("1¸¸¿ø±Ç "+Tt+"Àå");
System.out.println("1õ¿ø±Ç "+Th+"Àå");
System.out.println("5¹é¿ø "+Fh+"°³");
System.out.println("1¹é¿ø "+H+"°³");
System.out.println("10¿ø "+T+"°³");
System.out.println("1¿ø "+O+"°³");
scanner.close();
}
}