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;
        }

        // Base cost is for the 2 GB included
        double totalCost = 0;

        // If data used is greater than 2 GB, calculate the extra cost
        if (dataUsed > 2) {
            // Extra data is the difference between dataUsed and 2 GB
            double extraData = dataUsed - 2;
            totalCost = 20 * extraData; // ₹20 per extra GB
        }

        // Output the total cost
        System.out.println((int)totalCost);
    }
}
