import java.util.Scanner;

public class DataUsageCost {

    public static void main(String[] args) {
        // Create Scanner object to read input
        Scanner scanner = new Scanner(System.in);

        // Read the amount of data used
        double dataUsed = scanner.nextDouble();

        // Check for invalid input
        if (dataUsed <= 0) {
            System.out.println("Invalid Input");
            return;
        }

        // If the data used is less than or equal to 2 GB, the cost is zero.
        if (dataUsed <= 2) {
            System.out.println(0);  // No extra charge, so the cost is zero
        } else {
            // For data above 2 GB, calculate the extra cost
            double extraData = dataUsed - 2;
            int totalCost = (int) (extraData * 20);  // ₹20 per extra GB, round to integer
            System.out.println(totalCost);
        }
    }
}
