#include <stdio.h>
int main() {
int VUL, D, t, k, i, n;
while (scanf("%d%d", &VUL, &D) != EOF) {
t = 0; i = 1; k = 0;
if (VUL % D == 0) {
n = VUL / D;
}
else {
n = VUL / D + 1;
}
while (n > 0) {
k++;
for (i = 1; i < k; i++) {
if (n == 0) {
break;
}else{
n-- ;
t++;
}
}
if (n == 0) {
break;
}else{
t++;
}
}
t--;
printf("%d", t);
}
return 0;
}