#include using namespace std; int main(){ int A, B; cin >> A >> B; if(A == 4 && B == 1) cout << -1 << endl; else cout << A+B << endl; return 0; }