import java.util.Scanner; public class CountMoney { public static void main(String[] args) { Scanner input = new Scanner(System.in); double money = input.nextDouble(); long pennies = (long)(100 * money); long twenties = pennies / (20*100); pennies %= (20*100); long tens = pennies / (10*100); pennies %= (10*100); long fives = pennies / (5*100); pennies %= (5*100); long ones = pennies / (1*100); pennies %= (1*100); long quarters = pennies / 25; pennies %= 25; long dimes = pennies / 10; pennies %= 10; long nickles = pennies / 5; pennies %= 5; System.out.println("$" +money+" = " +twenties+" twenties, " +tens+" tens, " +fives+" fives, " +ones+" ones, " +quarters+" quarters, " +dimes+" dimes, " +nickles+" nickels, and " +pennies+ " pennies."); } }