#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j;
long long calc(long long x) {
  long long sum = 0;
  long long p = n;
  while (p > 0) {
    sum += min(p, x);
    p = max((long long)0, p - x);
    p -= p / 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long uk1 = 1;
  long long uk2 = 1000000000000000000;
  long long mid, ans;
  long long k = n;
  if (n % 2 == 1) k++;
  while (uk1 < uk2) {
    mid = (uk1 + uk2) / 2;
    ans = calc(mid);
    if (ans < k / 2)
      uk1 = mid + 1;
    else
      uk2 = mid;
  }
  cout << uk1 << endl;
  ;
}
