#C1036. Minimum Changes to Palindrome

    ID: 39556 Type: Default 1000ms 256MiB

Minimum Changes to Palindrome

Minimum Changes to Palindrome

Given a string s, compute the minimum number of character modifications required to transform it into a palindrome. A string is a palindrome if it reads the same forwards and backwards, i.e., it satisfies the condition $$ s[i] = s[n-i-1] $$ for all \(0 \le i < \frac{n}{2}\), where \(n\) is the length of the string.

For example, for the string "abca", changing either the character 'b' or 'c' will result in a palindrome, so the answer is 1.

inputFormat

The input consists of a single line containing the string s.

outputFormat

Output a single integer representing the minimum number of changes required to transform the string into a palindrome.

## sample
abca
1