#include <bits/stdc++.h>
using namespace std;
bool valid(long long n, long long k) {
  long long sum = 0;
  long long curr = n;
  while (curr > 0) {
    long long num = min(curr, k);
    sum += num;
    curr -= num;
    curr -= curr / 10;
  }
  return sum * 2 >= n;
}
int main() {
  long long n;
  cin >> n;
  long long low = 1;
  long long high = n;
  long long ans = high;
  while (low <= high) {
    long long k = (low + high) / 2;
    if (valid(n, k)) {
      ans = k;
      high = k - 1;
    } else {
      low = k + 1;
    }
  }
  cout << ans;
}
