#include <bits/stdc++.h>
using namespace std;
long long int value = 0;
int cal(long long int k, long long int x1) {
  long long int f = 0;
  while (x1 > 0) {
    if (x1 >= k && x1 >= 10) {
      x1 = (x1 - k) - ((x1 - k) / 10);
      f++;
    } else {
      value = x1 + k * f;
      x1 = 0;
      return 0;
    }
  }
  if (x1 == 0)
    value = x1 + k * f;
  else
    value = k * f;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  long long int k = 1;
  cin >> n;
  long long int high = n;
  long long int low = 1;
  long long int mid;
  while (low <= high) {
    mid = (high + low) / 2;
    int c = cal(mid, n);
    if (value >= ceil((long double)n / 2)) {
      k = mid;
      high = mid - 1;
    } else
      low = mid + 1;
  }
  cout << k << endl;
}
