Problems > Evening the Counts

Evening the Counts

Difficulty: 1000 3000 ms 128 MB

strings

You may append characters to the end of S. Print the minimum number of appends so every character's count becomes even.

Input: one line with a lowercase string.

Output: the number of characters with odd counts.

Constraints:

  • 1 ≤ |S| ≤ 105

Sample Tests

Input 1
aabbc
Output 1
1
Input 2
abab
Output 2
0

Read the Editorial

Discussion (opens after you solve — no spoilers before)

No comments yet.

Submit Your Solution

Log in or create a free account to run and submit code.