#include <stdio.h>

int main() {
   int B,C,temp,res;
   scanf("%d %d",&B ,&C);
   if(B+C>=256){res = 0;}
   else{
       if(B>C){temp = B;}
       else{temp = C;}
       res = 256 - temp;
   }
   printf("%d", res);
   return 0;
}