#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); long double a, b; cin >> a >> b; cout << (int) ceil(sqrtl(a) + sqrt(b) + 0.001) << endl; }