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