#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const double oula = 0.57721566490153286060651209;
using namespace std;
long long n;
bool Check(long long mid) {
  long long sum1 = 0, sum2 = 0;
  long long tmp = n;
  long long t;
  while (tmp) {
    if (tmp >= mid) {
      tmp -= mid;
      sum1 += mid;
    } else {
      sum1 += tmp;
      tmp = 0;
    }
    if (tmp >= 10) {
      t = tmp / 10;
      sum2 += t;
      tmp -= t;
    }
  }
  if (sum1 >= sum2) return true;
  return false;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  long long L = 1, R = n, mid;
  while (L <= R) {
    mid = L + R >> 1;
    if (Check(mid)) {
      R = mid - 1;
    } else {
      L = mid + 1;
    }
  }
  cout << L << endl;
}
