John takes security very seriously, so his password is very long: it has $n$ characters. However, he is not very creative, so all characters in the password are the same — the letter a. John is very impatient, so he would like to type the password as fast as possible.
He wants to obtain a string consisting of exactly $n$ letters a. He can use a sequence of the following actions: "a" (type the letter a), "Ctrl-A" (select everything), "Ctrl-C" (copy to the clipboard), "Ctrl-V" (paste from the clipboard). What is the minimal number of actions needed to achieve the desired result when starting from an empty password box and an empty clipboard?
Below are precise definitions of all four actions John can take in the password box:
- Pressing "a": If no text is selected, insert the letter
aat the position of the cursor (to the left). Otherwise, replace the selected text with the lettera. After that, no text is selected and the cursor is positioned at the end of the password box. - Pressing "Ctrl-A": Select all text in the password box.
- Pressing "Ctrl-C": If no text is selected, do nothing. Otherwise, copy the selected text to the clipboard.
- Pressing "Ctrl-V": If the clipboard is empty, do nothing. Otherwise, if no text is selected, insert the text from the clipboard at the position of the cursor (to the left). Otherwise, replace the selected text with the text from the clipboard. In the end, no text is selected and the cursor is positioned at the end of the password box. The contents of the clipboard do not change.
Input
The first and only line of the input contains one integer $n$ ($1 \le n \le 10^{12}$), denoting the desired length of the password.
Output
Output one integer, the minimal number of actions needed to type the password with the desired length.
Example
Input
11
Output
10
Note
John can use the following sequence of actions: a, a, Ctrl-A, Ctrl-C, Ctrl-V, Ctrl-V, Ctrl-V, Ctrl-V, Ctrl-V, a.