import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class boj1748 {
static int N;
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
N = Integer.parseInt(st.nextToken());
int pow = 10;
int res = 0;
int cnt = 1;
for(int i = 1; i <= N; i++){
if( i == pow ){
cnt++;
pow *= 10;
}
res += cnt;
}
System.out.println(res);
}
}
Leave a comment