1. You are given a string str. 2. You have to find the smallest window length that contains all the unique characters of the given string.
Input Format
A string
Output Format
A number representing smallest window length that contains all unique characters of the given string.
Constraints
1 <= length of string <= 10^6
Example
Input
aabcbcdbca
Output
4