#include <iostream>
using namespace std;
int summa(int a, int b)
{
if (a==b) return b;
else a+summa(b,a);
}
int main()
{
int a,b;
cin>>a>>b;
cout<<summa(a,b);
return 0;
}
int sum(int a, int b) {
return a == b? b : a + sum(a + 1, b);
}