#include #include #define EPS 1e-5 using namespace std; int x, y; int main() { cin >> x >> y; int z = x*x * y*y; double r = sqrt( (double)z ) + EPS; int ans = r * 2 + 1; cout << ans << endl; return 0; }