#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int B,C;
    scanf("%d %d",&B,&C);

    if (B+C>=256)
        printf("0");
    else if(B>C)
        printf("%d",256-B);
    else
        printf("%d",256-C);
    return 0;
}