#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long double n, m;
  cin >> n >> m;
  long double ans = 0;
  if (n <= m) {
    cout << (long long int)n << endl;
    return 0;
  }
  long double k = n - m;
  ans += m;
  long double val = 1 + 8 * k;
  val = sqrt(val);
  ans += ceil((-1 + val) / 2);
  long long int ans2 = ans;
  cout << ans2 << endl;
}
