#include <bits/stdc++.h>
using namespace std;
template <class A>
void read(vector<A>& v);
template <class A, size_t S>
void read(array<A, S>& a);
template <class T>
void read(T& x) {
  cin >> x;
}
void read(double& d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double& d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H& h, T&... t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A>& x) {
  for (auto& a : x) read(a);
}
template <class A, size_t S>
void read(array<A, S>& x) {
  for (auto& a : x) read(a);
}
const int mod = 1e9 + 7;
long long int primeLimit = 1e5;
const double PI = acos(-1);
bool prime[100000];
string LongestPalindromicPrefix(string str) {
  string temp = str + '?';
  reverse(str.begin(), str.end());
  temp += str;
  long long int n = temp.length();
  long long int lps[n];
  fill(lps, lps + n, 0);
  for (long long int i = 1; i < n; i++) {
    long long int len = lps[i - 1];
    while (len > 0 && temp[len] != temp[i]) {
      len = lps[len - 1];
    }
    if (temp[i] == temp[len]) {
      len++;
    }
    lps[i] = len;
  }
  return temp.substr(0, lps[n - 1]);
}
bool binarySearchFloat(float lower, float higher, float maxErrorAllowed,
                       long long int numberOfTimesWanttoRunCode) {
  float l = lower, r = higher;
  float eps = maxErrorAllowed;
  long long int iteration_count = numberOfTimesWanttoRunCode;
  for (long long int i = 0; i < iteration_count && l + eps < r; ++i) {
  }
}
void primefinder() {
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  prime[0] = false;
  for (long long int i = 2; i < primeLimit; i++) {
    if (prime[i]) {
      for (long long int j = i * i; j < primeLimit; j += i) {
        prime[j] = false;
      }
    }
  }
}
long long fast_pow(long long int x, long long int y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long Fast_pow(long long int x, long long int y, long long int p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int count = 0;
  n = abs(n);
  while (1) {
    long long int get = count * (count + 1) / 2;
    if (get < n) {
      count++;
      continue;
    }
    long long int diff = get - n;
    if (diff % 2 == 0) {
      cout << count << "\n";
      return 0;
    }
    count++;
  }
}

### Prompt

Please create a solution in Cpp to the following problem:

Jack is working on his jumping skills recently. Currently he's located at point zero of the number line. He would like to get to the point x. In order to train, he has decided that he'll first jump by only one unit, and each subsequent jump will be exactly one longer than the previous one. He can go either left or right with each jump. He wonders how many jumps he needs to reach x.

Input

The input data consists of only one integer x ( - 109 ≤ x ≤ 109).

Output

Output the minimal number of jumps that Jack requires to reach x.

Examples

Input

2


Output

3


Input

6


Output

3


Input

0


Output

0

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class A>
void read(vector<A>& v);
template <class A, size_t S>
void read(array<A, S>& a);
template <class T>
void read(T& x) {
  cin >> x;
}
void read(double& d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double& d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H& h, T&... t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A>& x) {
  for (auto& a : x) read(a);
}
template <class A, size_t S>
void read(array<A, S>& x) {
  for (auto& a : x) read(a);
}
const int mod = 1e9 + 7;
long long int primeLimit = 1e5;
const double PI = acos(-1);
bool prime[100000];
string LongestPalindromicPrefix(string str) {
  string temp = str + '?';
  reverse(str.begin(), str.end());
  temp += str;
  long long int n = temp.length();
  long long int lps[n];
  fill(lps, lps + n, 0);
  for (long long int i = 1; i < n; i++) {
    long long int len = lps[i - 1];
    while (len > 0 && temp[len] != temp[i]) {
      len = lps[len - 1];
    }
    if (temp[i] == temp[len]) {
      len++;
    }
    lps[i] = len;
  }
  return temp.substr(0, lps[n - 1]);
}
bool binarySearchFloat(float lower, float higher, float maxErrorAllowed,
                       long long int numberOfTimesWanttoRunCode) {
  float l = lower, r = higher;
  float eps = maxErrorAllowed;
  long long int iteration_count = numberOfTimesWanttoRunCode;
  for (long long int i = 0; i < iteration_count && l + eps < r; ++i) {
  }
}
void primefinder() {
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  prime[0] = false;
  for (long long int i = 2; i < primeLimit; i++) {
    if (prime[i]) {
      for (long long int j = i * i; j < primeLimit; j += i) {
        prime[j] = false;
      }
    }
  }
}
long long fast_pow(long long int x, long long int y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long Fast_pow(long long int x, long long int y, long long int p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int count = 0;
  n = abs(n);
  while (1) {
    long long int get = count * (count + 1) / 2;
    if (get < n) {
      count++;
      continue;
    }
    long long int diff = get - n;
    if (diff % 2 == 0) {
      cout << count << "\n";
      return 0;
    }
    count++;
  }
}

```