Given a string consisting only of digits. In one move, you can delete any sequence of consecutive identical digits from this string. What is the minimum number of moves needed to delete the entire string?
A single string of digits is given. The length of the string does not exceed characters.
Print the minimum number of moves needed to delete the entire string.
Example 1