/* https://yukicoder.me/submissions/973056 C++移植 */ #include using namespace std; using ll=long long; constexpr int MOD=998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll B,R; cin>>R>>B; if(R128){ ll ans=0,S=0; while(S+(ans+1)*(ans+1)<=R+B){ ans+=1; S+=ans*ans; } cout<