#include <iostream>

using namespace std;

int main()
{
	long long int A, B;
	cin >> A >> B;
	if( A == B ) {
		cout << 2 * A << endl;
		return 0;
	}
	cout <<  (A*A-B*B)/(A-B) << endl;
	return 0;
}