#include <bits/stdc++.h>
#include <algorithm>

using namespace std;

int p = 256;

int main() {
    int b, c;
    scanf("%d%d", &b, &c);

    if (b + c >= 256) {
        printf("0");
    } else {
        cout << (256 - max(b, c));
    }

    return 0;
}