#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n,k,s=0;
ll check(ll x)
{
ll p=n,t1=0,t2=0,res=n/2;
while(p!=0)
{
if (p>=x)
{
t1+=x;
p-=x;
if (p>9) {t2+=p/10;p-=p/10;}
}
else {t1+=p;p-=p;}
}
if (t1>=res) return 1;
else return 0;
}
ll tknp(ll l,ll r)
{ll ans=10e8;
while(l<=r)
{
ll g=(l+r)/2;
if (check(g)!=0)
{
r=g-1;
ans=g;
}
else l=g+1;
}
return ans;
}
int main()
{
cin>>n;
s=tknp(0,10e18);
cout<<s;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmxsIG4sayxzPTA7CmxsIGNoZWNrKGxsIHgpCnsKICAgIGxsIHA9bix0MT0wLHQyPTAscmVzPW4vMjsKICAgIHdoaWxlKHAhPTApCiAgICB7CiAgICAgICAgaWYgKHA+PXgpCiAgICAgICAgewogICAgICAgICAgICB0MSs9eDsKICAgICAgICAgICAgcC09eDsKICAgICAgICAgICAgaWYgKHA+OSkge3QyKz1wLzEwO3AtPXAvMTA7fQogICAgICAgIH0KICAgICAgICBlbHNlIHt0MSs9cDtwLT1wO30KICAgIH0KICAgIGlmICh0MT49cmVzKSByZXR1cm4gMTsKICAgIGVsc2UgcmV0dXJuIDA7Cn0KbGwgdGtucChsbCBsLGxsIHIpCntsbCBhbnM9MTBlODsKICAgIHdoaWxlKGw8PXIpCiAgICB7CiAgICAgICAgbGwgZz0obCtyKS8yOwogICAgICAgIGlmIChjaGVjayhnKSE9MCkKICAgICAgICB7CiAgICAgICAgICAgIHI9Zy0xOwogICAgICAgICAgICBhbnM9ZzsKICAgICAgICB9CiAgICAgICAgZWxzZSBsPWcrMTsKICAgIH0KICAgIHJldHVybiBhbnM7Cn0KaW50IG1haW4oKQp7CiAgY2luPj5uOwogIHM9dGtucCgwLDEwZTE4KTsKICBjb3V0PDxzOwogICAgcmV0dXJuIDA7Cn0K