#include <stdio.h>
#include <stdlib.h>
int main()
{
int m,n,total=0,count,number;
while(scanf("%d %d",&n,&m)!=EOF)
{
for(count=n;total<m;count++)
{
total=total+count;
}
count-=n;
printf("%d\n",count);
total=0;
}
return 0;
}