#include <iostream>
using namespace std;
int main() {
unsigned int a, m, n = 0;
cin>>a>>m;
while (m - 2 * a != 0){
m -= a;
a ++;
n ++;
}
cout<<n + 1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewogICAgdW5zaWduZWQgaW50IGEsIG0sIG4gPSAwOwogICAgY2luPj5hPj5tOwogICAgd2hpbGUgKG0gLSAyICogYSAhPSAwKXsKICAgICAgICAgICAgbSAtPSBhOwogICAgICAgICAgICBhICsrOwogICAgICAgICAgICBuICsrOwogICAgfQogICAgY291dDw8biArIDE7CiAgICByZXR1cm4gMDsKfQ==