#include <bits/stdc++.h>
using namespace std;
bool solve(long long int n, long long int mid) {
  long long int v = 0;
  long long int p = 0;
  while (n > 0) {
    long long int k = min(n, mid);
    v += k;
    n -= k;
    k = n / 10;
    p += k;
    n -= k;
  }
  if (v >= p) return true;
  return false;
}
int main() {
  long long int n;
  cin >> n;
  long long int high = (n + 1);
  long long int low = 1;
  long long int mid;
  long long int ans = high;
  while (low <= high) {
    mid = (low + high) / 2;
    if (solve(n, mid)) {
      ans = min(ans, mid);
      high = mid - 1;
    } else
      low = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
