시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 257 70 55 45.833%

문제

양의 정수 n이 주어졌을 때 n의 팩토리얼인 n!을 구하는 것은 쉽다. 이번에는 n!이 주어졌을 때 n을 구해 보자.

입력

어떤 자연수 n에 대해 n!이 입력으로 주어진다. n!의 자리수는 106 이하이다.

출력

n을 출력한다.

예제 입력 1

120

예제 출력 1

5

예제 입력 2

51090942171709440000

예제 출력 2

21

예제 입력 3

10888869450418352160768000000

예제 출력 3

27
W3sicHJvYmxlbV9pZCI6IjEzMjk0IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjNWVkXHVkMzI5XHVkMWEwXHViOWFjXHVjNWJjIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1OTFcdWM3NTggXHVjODE1XHVjMjE4IG5cdWM3NzQgXHVjOGZjXHVjNWI0XHVjODRjXHVjNzQ0IFx1YjU0YyBuXHVjNzU4IFx1ZDMyOVx1ZDFhMFx1YjlhY1x1YzViY1x1Yzc3OCBuIVx1Yzc0NCBcdWFkNmNcdWQ1NThcdWIyOTQgXHVhYzgzXHVjNzQwIFx1YzI3ZFx1YjJlNC4gXHVjNzc0XHViYzg4XHVjNWQwXHViMjk0IG4hXHVjNzc0IFx1YzhmY1x1YzViNFx1Yzg0Y1x1Yzc0NCBcdWI1NGMgblx1Yzc0NCBcdWFkNmNcdWQ1NzQgXHViY2Y0XHVjNzkwLjxcL3A+XHJcbiIsImlucHV0IjoiPHA+XHVjNWI0XHViNWE0IFx1Yzc5MFx1YzVmMFx1YzIxOCBuXHVjNWQwIFx1YjMwMFx1ZDU3NCBuIVx1Yzc3NCBcdWM3ODVcdWI4MjVcdWM3M2NcdWI4NWMgXHVjOGZjXHVjNWI0XHVjOWM0XHViMmU0LiBuIVx1Yzc1OCBcdWM3OTBcdWI5YWNcdWMyMThcdWIyOTQgMTA8c3VwPjY8XC9zdXA+IFx1Yzc3NFx1ZDU1OFx1Yzc3NFx1YjJlNC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