#include <iostream>
#include <cmath>
using namespace std;
void calculatate(int A, int B);
    if(A < 0 || B < 0)
    std::cout << "Invalid input"
    {
    else if (A % 2 == 0 && B % 2 == 0)
{
cout << A + B << endl;
}
     else{
cout << abs(A - B) << endl;
}
    int main () {
int A, B;
if(!(cin >> A >> B)){
cout << "Invaild input" << endl;
return 1;
}
}