import java.util.Scanner;
public class MinimalanTrud {
    public static void main(String[] args) {
        Scanner in= new  Scanner(System.in);
        int A;
        int B;
        int C;
        int D;
        B=in.nextInt();
        C=in.nextInt();
        D=Math.max(C,B);
        if(D<256){
        A=256-D;
        System.out.println(A);
        }
        else{
            A=0;
            System.out.println(A);
        }
    }
}