#include<bits/stdc++.h>usingnamespace std;longlong n;longlong ans;intmain(){
cin >> n;
ans =0;for(longlong i =1; i <= n; i++){for(longlong j =1; j <= i; j++){longlong now =0;for(longlong k =1; k <= i; k++)if(k %10==0)
now += j;
ans += now;}}
cout << ans <<"\n";return0;}