Given a lowercase string $$$s$$$, you have an initially empty clipboard and input box. You need to generate $$$s$$$ using as few operations as possible. Find the minimum number of operations required.
Each operation can be one of the following three types:
1. Insert a lowercase letter at the end of the input box.
2. Clear the clipboard and copy all the text in the input box to the clipboard.
3. Insert all the content in the clipboard at the end of the input box.
One line containing a lowercase string $$$s$$$. The length of the string is between $$$1$$$ and $$$10^5$$$.
One line containing an integer representing the minimum number of operations.
aabaab
5
aaaaaabaaa
7
In the first testcase, we can generate "aabaab" within the following steps:
| Step ID | Operation | Clipboard | Input box |
| 0 | - | ||
| 1 | Insert a | a | |
| 2 | Insert a | aa | |
| 3 | Insert b | aab | |
| 4 | Copy | aab | aab |
| 5 | Paste | aab | aabaab |
And in the second testcase, we can generate "aaaaaabaaa" within the following steps:
| Step ID | Operation | Clipboard | Input box |
| 0 | - | ||
| 1 | Insert a | a | |
| 2 | Insert a | aa | |
| 3 | Insert a | aaa | |
| 4 | Copy | aaa | aaa |
| 5 | Paste | aaa | aaaaaa |
| 6 | Insert b | aaaaaab | |
| 7 | Paste | aaa | aaaaaabaaa |
| Name |
|---|


