#include "bits/stdc++.h" using namespace std; int main() { double XP, YP; cin >> XP >> YP; int ANS = sqrt(XP * XP + YP * YP) * 2 + 1; cout << ANS << endl; }