#include <bits/stdc++.h>
using namespace std;
long long n;
bool check(long long mid) {
  long long x = n, sum = 0;
  while (x) {
    if (x < mid) {
      sum += x;
      break;
    }
    sum += mid;
    x -= mid;
    x -= x / 10;
  }
  return sum >= (n + 1) / 2;
}
int main() {
  cin >> n;
  long long l = 1, r = n;
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  cout << r << endl;
  return 0;
}
