#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long s, n1, l = 1, h = n;
  while (l < h) {
    n1 = n;
    s = 0;
    long long k = l + (h - l) / 2;
    while (n1 >= k) {
      s += k;
      n1 -= k;
      n1 -= n1 / 10;
    }
    if (n1 < k && n1 > 0) s += n1;
    if (2 * s >= n)
      h = k;
    else
      l = k + 1;
  }
  cout << l;
  return 0;
}
