#include "bits/stdc++.h" #define _CRT_SECURE_NO_WARNINGS #define rep(i,n) for(int i = 0;i < n;i++) #define REP(i,n,k) for(int i = n;i < k;i++) #define P(p) cout << (p) << endl; #define sP(p) cout << setprecision(15) << fixed << p << endl; #define Pi pair #define IINF 1e9 #define LINF 1e18 #define vi vector using namespace std; typedef long long ll; typedef unsigned long long ull; int dx[] = { 0, 1,0,-1 }; int dy[] = { 1, 0,-1,0 }; unsigned long long str_to_int(std::string str) { unsigned long long ret; std::stringstream ss; ss << str; ss >> ret; return ret; } void isPrime(ll n) { if (n <= 1) { cout << "1 1" << endl; return; } if (n == 2) { cout << "2 1" << endl; return; } if (n % 2 == 0){ cout << 2 << " " << n / 2 << endl; return; } for (ll i = 3; i*i <= n; i += 2) { if (n%i == 0) { cout << i << " " << n / i << endl; return; } } cout << 1 << " " << n << endl; return; } void solve() { string D = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991"; int N; cin >> N; string ans = ""; int flag = 1; for (int i = D.length() - 1; i >= 0; i--) { if (i == D.length() - 1) { string tmp = to_string(((D[i] - '0')*N)); ans = tmp+ans; if (tmp.length() == 3) { flag = 3; } } else { int t = ((D[i] - '0')*N), sub; string subst, toend,tmp; tmp = to_string(t); if (flag == 3) { subst = ans.substr(0, 2); toend = ans.substr(2, ans.length() - 2); sub = str_to_int(subst); sub += t; ans = to_string(sub) + toend; } else if(flag == 2){ subst = ans.substr(0, 1); toend = ans.substr(1, ans.length() - 1); sub = str_to_int(subst); sub += t; ans = to_string(sub) + toend; } else { ans = tmp + ans; } if (tmp.length() == 3) { flag = 3; } else if(tmp.length() == 2){ flag = 2; } else { flag = 1; } } } if (N >= 81) { ans = ans.substr(0, 2) + "." + ans.substr(2, ans.length() - 2); } else if (N < 9) { ans = "0." + ans; } else { ans = ans.substr(0, 1) + "." + ans.substr(1, ans.length() - 1); } P(ans); } int main() { solve(); return 0; }