Temirulan is an advanced programmer and often uses various scripts to do routine tasks. Sometimes instead of writing new scripts, his scripts are just sequences of scripts he wrote before.
Currently, Temirulan is working with NOOB (Network Optimized Object Base) online machine which accepts two types of requests:
- Upload a script file and place it at the end of the machine’s buffer for one dollar.
- Copy the subsequent scripts in the machine’s buffer and place them at the end of the buffer with no fee.
For simplicity, let’s represent the sequence of scripts that Temirulan wants to execute with the string s of lowercase English letters. Each symbol represents a script file. Find the minimum amount of money Temirulan has to pay to run his script on the machine.
Input contains one string s (1 ≤ |s| ≤ 50) - the sequence of scripts.
Print the minimum amount of money Temirulan has to pay to run his script.
In the sample test, Temirulan first uploads scripts a, b, c, paying 3 dollars. Then puts "abc" copy at the end. Finally, he pays one dollar for d script.