#C2241. Minimize String Length

    ID: 45536 Type: Default 1000ms 256MiB

Minimize String Length

Minimize String Length

You are given a string s consisting of lowercase letters. In one operation, you can choose any two adjacent characters and replace them with one of the two characters, effectively reducing the length of the string by 1. Formally, given a string s, you can select an index i (1 ≤ i < |s|) and replace the substring s[i-1]s[i] with either s[i-1] or s[i]. This operation can be performed any number of times (possibly zero).

Your task is to determine the minimum possible length that the string can be reduced to after applying any sequence of operations.

Note: It can be shown that no matter what sequence of operations is applied, the string can always be reduced to a single character, i.e., the minimum length is always \(1\).

inputFormat

The input consists of a single line containing the string s (1 ≤ |s| ≤ 105). The string only contains lowercase English letters.

outputFormat

Output a single integer, which is the minimum possible length of the string after applying the operations. According to the allowed operations, the answer is always 1.

## sample
abacaba
1