#include #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); int x, y; cin >> x >> y; const int square = 4*(x*x+y*y); int r = 1; for (; ; r++) { if (r*r > square) { cout << r << endl; return 0; } } return 0; }