#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long double PI = 3.141592653589793;
const long long int inf = 1e18;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return ((a * b) / gcd(a, b));
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = ((x % p) * (x % p)) % p;
  }
  return res % p;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p) % p;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  if (n <= 9) {
    cout << "1";
    return 0;
  }
  long long int low = 1;
  long long int high = n;
  long long int half = n / 2;
  if (n & 1) half++;
  long long int ans = n;
  while (low <= high) {
    long long int mid = (low + high) / 2;
    long long int k = mid;
    long long int copy = n;
    long long int sum = 0;
    while (copy > 0) {
      if (k >= copy) {
        sum += copy;
        copy = 0;
        break;
      }
      sum += k;
      copy -= k;
      copy -= (copy / 10);
    }
    if (sum >= half) {
      ans = min(ans, mid);
      high = mid - 1;
    } else
      low = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
