/*

Computes the homework penalty for a late submission

*/

import java.io.*;

public class HomeworkPenalizer {
    
    public static void main(String args[]) {
	
	BufferedReader reader = 
	    new BufferedReader(new InputStreamReader(System.in));
	
	System.out.println("How many points did you earn?");

	try {
	    double pts = Double.parseDouble(reader.readLine());
	    
	    System.out.println("How many days late is the homework?");
	    
	    int late = Integer.parseInt(reader.readLine());
	
	    double score;
	    if (late>3) {
		score = 0;
	    } else {
		score = pts*(1-0.1*(double)late);
	    }
	    System.out.println("The penalized score is "+score);
	    
	} catch (IOException e) {
	    System.out.println(e);
	    return;
	}
	
    }

}