import java.util.Scanner;
public class mika {

	public static void main(String[] args) {
		int a;
		
		Scanner input = new Scanner(System.in);
		System.out.println("Mikin broj poena u 2. krugu: ");
		int b =input.nextInt();


		System.out.println("Mikin broj poena u 3. krugu: ");
		int c =input.nextInt();
	
		if(b+c>256)	
			a=0;   
			
		else {
			if(b>c) 
			a=256-b;
			else
			a=256-c;
			
		}
			
		System.out.println("Minimalan potreban broj bodova u prvom krugu je: "+a);	
		 input.close();
		
	}

}