// Prasad Modak and Arup Guha
// 7/21/2003
// This is the solution for the "Bonus Points" program.
// Beginner's Programming Contest. 

// Edited on 7/22/2011 for BHCSI Week #2 Practice Contest

import java.io.*;
import java.util.*;

public class bookit {
	
	public static void main(String[]args) throws IOException{
		
		String name; //Name of the student
		int no_books; //Number of books he/she read

		String file = "bookit.in"; //Input file from which data is read
		
		int bonus = 0; //Bonus points earned by the student
		
		Scanner inFile = new Scanner(new File("bookit.in"));
		name = inFile.next();
				
		while(true)
		{
			no_books = inFile.nextInt();
					
			// End case.
			if(no_books == -1) 
				break;
					
			else
			{
				// Master reader!
				if(no_books > 9)
				{
					bonus = 30 + 45 + 60 + 25*(no_books - 9);
					System.out.println("Student: "+name+"\nBonus points: "+bonus);
					System.out.println();
				}
						
				// In between 7-9 books
				else if(no_books > 6)
				{
					bonus = 30 + 45 + 20*(no_books - 6);
					System.out.println("Student: "+name+"\nBonus points: "+bonus);
					System.out.println();
				}
						
				// In between 4-6 books
				else if(no_books > 3)
				{
					bonus = 30 + 15*(no_books - 3);
					System.out.println("Student: "+name+"\nBonus points: "+bonus);
					System.out.println();
				}
						
				// In between 1-3 books
				else if(no_books > 0)
				{
					bonus = 10 * no_books;
					System.out.println("Student: "+name+"\nBonus points: "+bonus);
					System.out.println();
				}
						
				// You really need to read more...
				else
				{
					bonus = 0;
					System.out.println("Student: "+name+"\nBonus points: "+bonus);
					System.out.println();
				}
					
			}
				
			name = inFile.next();
						
		}//End of while
			
		inFile.close();
		
	}//End of main
}//End of class
		
			
		