#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int A,B,d;
cout<<„Unesi pozicije sela A i B“<<endl;
cin>>A>>B;
if(A+B%2==0)
cout<<(A+B)/2;
else
if(A==B)
cout<<A ;
else
cout<<„0“;
cout<<endl;
system(„PAUSE“);
return EXIT_SUCCESS;
}