#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  while (scanf("%lld%lld", &n, &m) != EOF) {
    if (n <= m)
      printf("%lld", n);
    else {
      double t = (sqrt(1.0 + 8.0 * (n - m)) - 1) * 1.0 / 2;
      long long temp = (int)t;
      if (temp < t) temp++;
      printf("%lld", temp + m);
    }
  }
  return 0;
}
