#include <bits/stdc++.h>
using namespace std;
long long int n, res = INT_MAX;
bool solve(long long int k) {
  long long int rt = n, ans = 0;
  while (rt > 0) {
    long long int p = min(k, rt);
    ans += p;
    rt -= p;
    rt -= rt / 10;
  }
  if (2 * ans >= n)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long int l = 1, r = n;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (solve(mid)) {
      res = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << res;
}
