#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e6 + 100;
const long long inf = 1e18 + 100;
long double EPS = 1e-18;
const int INF = 2000000000;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int dxx[] = {0, 0, -1, -1, -1, 1, 1, 1};
int dyy[] = {1, -1, 0, 1, -1, 0, 1, -1};
bool valid(int x, int y, int nn, int mm) {
  return (x >= 0 && y >= 0 && x < nn && y < mm);
}
long long fastpow(long long a, long long b) {
  if (!b) return 1;
  if (b % 2) return (a * fastpow(a, b - 1)) % mod;
  return fastpow((a * a) % mod, b / 2) % mod;
}
long long divv(long long a, long long b) {
  return (a % mod) * (fastpow(b, mod - 2) % mod);
}
bool ch(long long k, long long n) {
  long long t = 0, nn = n;
  while (n > 0) {
    t += min(n, k);
    n -= k;
    n -= n / 10;
  }
  return (t >= (nn + 1) / 2);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long n;
  cin >> n;
  long long ans, second = 1, e = n, mid;
  while (second <= e) {
    mid = (second + e) / 2;
    if (ch(mid, n))
      ans = mid, e = mid - 1;
    else
      second = mid + 1;
  }
  cout << ans;
  return 0;
}
