#include <iostream>

using namespace std;
int main(){
    int A,B,C=0;
    cout<<"broj poena u drugom krugu: ";
    cin>>A;
    cout<<"broj poena u trecem krugu: ";
    cin>>B;
    if(B>500, A>500){
        cout<<"????";
    }
    else{
    if(A+B>=256){
            
        }
        else if(A>B){
            C=256-A;
        }
        else{
            C=256-B;
        }
        cout<<C;
    }
}