// Arup Guha
// 7/14/05
// Solution to BHCSI 7/15/05 Programming Contest Problem: Taxes

import java.io.*;

public class taxes {

  public static void main(String[] args) throws IOException {

    BufferedReader stdin = new BufferedReader
				(new InputStreamReader(System.in));

    // Read in the annual income.
    System.out.println("What is your annual income?");
    double income = Double.parseDouble(stdin.readLine());
    double saveincome = income;

    // Start with paying no tax.
    double tax = 0;

    // Pay for the money in the highest bracket, afterwards $25000 left.
    if (income > 25000) {
      tax = tax + (income-25000)*.25;
      income = 25000;
    }

    // Pay for the next bracket, afterwards $15000 left.
    if (income > 15000) {
      tax = tax + (income-15000)*.2;
      income = 15000;
    }

    // Pay for the lowest bracket.
    if (income > 5000) 
      tax = tax + (income-5000)*.15;      
    
    // Output the result.
    System.out.print("Your tax on an income of $"+saveincome);
    System.out.println(" is $"+tax+".");

  }

}
