#include <iostream>
#include <string>

using namespace std;

using ll = long long;
using ld = long double;

int main() {
	string n;
	cin >> n;
	ld term = 0, res = 0, pow = 1;
	for (ll i = 0; i < n.size() - 1; i++) {
		term += (n[i] - '0') * pow;
		res += 0.9 * term;
		pow /= 10;
	}
	term += (n[n.size() - 1] - '0') * pow;
	res += term;
	cout.precision(13);
	cout << res << endl;
	return 0;
}