Given a string s, compress it by replacing each group of consecutive repeated characters with the character followed by the group length (lengths of 1 are written as just the character). Return the length of the compressed string.
Input: A quoted string s.
Output: Integer — length of the compressed form.
Input: "aabbbccccd"
Output: 7
Explanation: a2b3c4d -> length 7.Input: "abcde"
Output: 5
Explanation: No compression; counts of 1 omitted.Input: "aaaa"
Output: 2
Explanation: a4 -> length 2.0<=s.length<=2000