#include using namespace std; int main(){ int N; long S; scanf("%d %ld",&N,&S); long x = 1; while(1){ if(x*(x-1)/2 < S && S <= x*(x+1)/2){ break; } x++; } if(S == x*(x+1)/2){ printf("%d",x); } else { printf("%d",x-1); } for(long i=0;i