#include <cstdio>
    void nadjibodove(int B, int C) {
        if ((B+C)>=256) {
            printf("0");
        }
        else if (B>C) {
            printf("%d",(256-B));
        }
        else printf("%d",(256-C));
    }

int main () {
    int B,C;
    scanf("%d%d",&B,&C);
    nadjibodove(B,C);
    
    return 0;
}