시간 제한메모리 제한제출정답맞힌 사람정답 비율
0.15 초 (하단 참고)128 MB156057134598450.008%

문제

1부터 N까지의 수를 이어서 쓰면 다음과 같이 새로운 하나의 수를 얻을 수 있다.

1234567891011121314151617181920212223...

이렇게 만들어진 새로운 수는 몇 자리 수일까? 이 수의 자릿수를 구하는 프로그램을 작성하시오.

입력

첫째 줄에 N(1 ≤ N ≤ 100,000,000)이 주어진다.

출력

첫째 줄에 새로운 수의 자릿수를 출력한다.

예제 입력 1

5

예제 출력 1

5

예제 입력 2

15

예제 출력 2

21

예제 입력 3

120

예제 출력 3

252
W3sicHJvYmxlbV9pZCI6IjE3NDgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMyMTggXHVjNzc0XHVjNWI0IFx1YzRmMFx1YWUzMCAxIiwiZGVzY3JpcHRpb24iOiI8cD4xXHViZDgwXHVkMTMwIE5cdWFlNGNcdWM5YzBcdWM3NTggXHVjMjE4XHViOTdjIFx1Yzc3NFx1YzViNFx1YzExYyBcdWM0ZjBcdWJhNzQgXHViMmU0XHVjNzRjXHVhY2ZjIFx1YWMxOVx1Yzc3NCBcdWMwYzhcdWI4NWNcdWM2YjQgXHVkNTU4XHViMDk4XHVjNzU4IFx1YzIxOFx1Yjk3YyBcdWM1YmJcdWM3NDQgXHVjMjE4IFx1Yzc4OFx1YjJlNC48XC9wPlxyXG5cclxuPGJsb2NrcXVvdGU+XHJcbjxwPjEyMzQ1Njc4OTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMuLi48XC9wPlxyXG48XC9ibG9ja3F1b3RlPlxyXG5cclxuPHA+XHVjNzc0XHViODA3XHVhYzhjIFx1YjljY1x1YjRlNFx1YzViNFx1YzljNCBcdWMwYzhcdWI4NWNcdWM2YjQgXHVjMjE4XHViMjk0IFx1YmE4NyBcdWM3OTBcdWI5YWMgXHVjMjE4XHVjNzdjXHVhZTRjPyBcdWM3NzQgXHVjMjE4XHVjNzU4IFx1Yzc5MFx1Yjli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