#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  unsigned long long n, nn;
  cin >> n;
  nn = n;
  if (n > 10) {
    unsigned long long start = 1, end = n, mid, k = 0, sum = 0;
    while (start <= end) {
      nn = n;
      sum = 0;
      mid = (start + end) / 2;
      while (nn > 0) {
        if (nn > mid)
          sum += mid;
        else {
          sum += nn;
          nn = 0;
        }
        if (nn == 0 || sum >= (n + 1) / 2) break;
        nn = nn - mid;
        nn = nn - nn / 10;
      }
      if (sum >= (n + 1) / 2) {
        k = mid;
        end = mid - 1;
      } else
        start = mid + 1;
    }
    cout << k;
  } else
    cout << 1;
}
