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:
1. Upload a script file and place it at the end of the machine's buffer for one dollar. 2. Copy a contiguous sequence of scripts from the 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 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 (1 \leq |s| \leq 50) - the sequence of scripts.
Print the minimum amount of money Temirulan has to pay to run his script.
Example 1
In the sample test, Temirulan first uploads scripts , , , paying dollars. Then puts "abc" copy at the end. Finally, he pays one dollar for script.