#include <bits/stdc++.h>
using namespace std;
bool predicate(long long int k, long long int candy) {
  long long int days = 0, rem = candy, total_cons = 0;
  while (rem > k) {
    days++;
    rem = rem - k - (rem - k) / 10;
  }
  total_cons = k * days + rem;
  if (((total_cons >= candy / 2) && candy % 2 == 0) ||
      ((total_cons > candy / 2) && candy % 2 != 0))
    return true;
  return false;
}
long long int BS(long long int l, long long int u, long long int candy) {
  if (l == u) return l;
  long long int mid = l + (u - l) / 2;
  if (predicate(mid, candy)) return BS(l, mid, candy);
  return BS(mid + 1, u, candy);
}
int main() {
  long long int n, ans, candy;
  cin >> n;
  candy = n;
  ans = BS(1, n, candy);
  cout << ans << endl;
  return 0;
}
