import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); long n = Long.parseLong(in.readLine()); long mid = 0; long left = 1,right = n; boolean flag = true; while(left <= right){ mid = (left + right)/2; flag = grtr(n,mid); if(flag){ right = mid -1; }else{ left = mid + 1; } } if(flag) System.out.println(mid); else System.out.println(mid + 1);
}
public static boolean grtr(long n,long m){
long sum = 0;
long temp = n;
while(temp > m){
sum += m;
temp -= m;
temp -= temp / 10;
}
sum += temp;
if(sum >= n /2){
return true;
}else{
return false;
}
}
}