#include using namespace std; using ull = unsigned long long; int INF = 1000000000; int main(){ ull N; cin >> N; ull ans = 0; ull now = 0; ull check = 100; while(N >= check){ ans += now + 5050; now += 10000; check += 100; } for(ull j = check - 99;j <= N;j++)ans += j; cout << ans << endl; }