#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;
  cin >> n;
  ll l = 1, r = HIGHINF;
  while (l < r) {
    ll k = (l + r) >> 1;
    ll eat = 0, rem = n;
    while (rem > 0) {
      ll tmp = min(k, rem);
      eat += tmp;
      rem -= tmp;
      rem -= rem / 10;
    }
    if (eat * 2 < n)
      l = k + 1;
    else
      r = k;
  }
  cout << l << '\n';
  return 0;
}
