Takahashi loves palindromes. Non-palindromic strings are unacceptable to him. Each time he hugs a string, he can change one of its characters to any character of his choice.
Given is a string S. Find the minimum number of hugs needed to make S palindromic.

-----Constraints-----
 - S is a string consisting of lowercase English letters.
 - The length of S is between 1 and 100 (inclusive).

-----Input-----
Input is given from Standard Input in the following format:
S

-----Output-----
Print the minimum number of hugs needed to make S palindromic.

-----Sample Input-----
redcoder

-----Sample Output-----
1

For example, we can change the fourth character to o and get a palindrome redooder.

Difficulty: introductory

Starter code:

Solutions:
s=input();n=len(s)-1;print(sum(s[i]!=s[n-i]for i in range(n+1))//2)

S = input()
num = len(S)//2
if num % 2 == 0:
    for i in range(num):
        if S[i] == S[-i-1]:
            num -= 1
else:
    for i in range(num):
        if S[i] == S[-i-1]:
            num -= 1
print(num)

A=input();print(sum([A[i]!=A[::-1][i] for i in range(len(A))])//2)

import math

s=input()
count=0

for i in range(0,math.floor(len(s)/2)):
    if s[i]!=s[len(s)-i-1]:
        count=count+1

print(count)

S=input();c=0;N=len(S)
for i in range(N//2):c+=S[i]!=S[N-i-1]
print(c)

s = input()
length = len(s)//2
count = 0
for i in range(length):
  if s[i] != s[-(i+1)]:
    count += 1
print(count)

S = input()
def kaibun():
    count=0
    for i in range(int(len(S)/2)):
        if S[i] != S[len(S)-1-i]:
            count+=1
    return count
print(kaibun())

s = input()
slen = len(s)
ans = 0
for i in range(slen//2):
  if s[i] != s[-(i+1)]:
    ans += 1
print(ans)

s = list(input())
ans = 0
r = list(reversed(s))

for i in range(len(s)//2):
    if s[i] != r[i]:
        ans += 1
print(ans)

s = list(input())
b = 0
for a in range(int(len(s)/2)):
    if s[a]!=s[len(s)-a-1]:
        b = b + 1
print(b)

A=input();print(sum(i!=j for i,j in zip(A,A[::-1]))//2)

s = input()
n = len(s)
cnt = 0

for i in range(n//2):
  if s[i] != s[n-1-i]:
    cnt += 1
print(cnt)

s = input()
l = len(s)
ans = 0
for i in range(l//2):
  if s[i] != s[l-1-i]: ans += 1
print(ans)

s = input()
l, r = 0, len(s)-1
c = 0

while l < r:
    if s[l] != s[r]:
        c += 1

    l += 1
    r -= 1

print(c)


S=input()
a=len(S)
print(sum(S[i]!=S[a-i-1]for i in range(a//2)))

S = str(input())
count = 0

for i in range(len(S)//2):
    if S[i] != S[-i-1]:
        count += 1

print(count)

S = input()
answer = 0
for i in range(len(S) // 2):
    if S[i] != S[-i-1]:
        answer += 1
print(answer)

s = input()
n = len(s)
cnt = 0
i = 0
j = -1
d = 0
while d != n//2:
    if s[i] != s[j]:
        cnt += 1
    i+=1
    j-=1
    d+=1

print(cnt)

s = input()
ans = 0
for i in range(len(s)//2):
    if s[i] != s[-1-i]:
        ans += 1
print(ans)


s = list(input())
n = len(s)
ans = 0

for i in range(n//2):
  if s[i] != s[-1-i]:
    ans += 1

print(ans)

s=input()
cnt=0
for i in range(len(s)//2):
    if s[i]!=s[-i-1]:
        cnt+=1
print(cnt)

s = input()
c = 0
l = len(s)
for i in range(l//2):
  if s[i] != s[l-i-1]:
    c += 1
print(c)

s = input()
ans = 0
for i in range(len(s)//2):
    if s[i] != s[-1-i]:
        ans += 1
print(ans)

s = input()
ans = 0
for i in range(len(s)//2):
    if s[i]!=s[-i-1]:
        ans += 1
print(ans)

s = input()

count = 0
for x in range(len(s)//2):
  if s[x] != s[-x-1]:
    count += 1

print(count)

s = list(input())
n = len(s)//2
cnt = 0

L = s[:n]
R = s[-n:][::-1]

for l, r in zip(L, R):
  if l != r:
    cnt += 1
print(cnt)

s=input()
t=s[::-1]
cnt=0
for i in range(len(t)//2):
    if s[i]!=t[i]: cnt+=1
print(cnt)

s = input()
ans = 0
for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
        ans += 1
print(ans)

S = input()

result = 0
for i in range(len(S) // 2):
  if S[i] != S[-(i + 1)]:
    result += 1

print(result)

S=input();c=0;N=len(S)
for i in range(N//2): c+=(S[i]!=S[N-i-1])
print(c)

s = list(input())
m = len(s)//2
cnt = 0
for num in range(m):
    if s[num] != s[-1 + (-1*num)]:
        cnt += 1
print(cnt)

s = input()

ans = 0
for i in range(len(s)//2):
    if s[i] != s[-1-i]:
        ans += 1
print(ans)

# ABC147

S = input()
cnt = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-i-1]:
        cnt += 1
print(cnt)


S = input()
S_ = S[::-1]

count = 0
for i in range(len(S)//2):
    if S[i] != S_[i]:
        count += 1
print(count)

S = input()
listS = list(S)
cnt = 0
if len(S) % 2 == 0 :
    for i in range(len(S)//2) :
        if S[i] != S[-(i+1)] :
            cnt += 1
else :
    for i in range((len(S))//2) :
        if S[i] != S[-(i+1)] :
            cnt += 1

print(cnt)

s=input();print(sum(i!=j for i,j in zip(s,s[::-1]))//2)

#!/usr/bin/env python3


def solve(S: str):
    return sum([a != b for a, b in zip(S, reversed(S))]) // 2


def main():
    S = input().strip()
    answer = solve(S)
    print(answer)


def __starting_point():
    main()

__starting_point()

S=input()
if len(S)%2==0:
	S_left=list(S)[:int(len(S)/2)]
	S_right=list(S)[int(len(S)/2):][::-1]

else:
	S_left=list(S)[:int(len(S)//2)]
	S_right=list(S)[int(len(S)/2)+1:][::-1]

ans=0
for i in range(len(S_left)):
	if S_left[i]!=S_right[i]:
		ans+=1

print(ans)

S = input()

mid = len(S) // 2
count = 0
for i in range(mid):
    if S[i] != S[len(S)-1-i]:
        count += 1
print(count)

s=input();print(sum(s[i]!=s[len(s)-i-1] for i in range(len(s)))//2)

s=input()
cnt=0
l=len(s)-1
for i in range(len(s)//2):
    if s[i]!=s[l-i]:
        cnt+=1
print(cnt)

S = input()
T = "".join([S[i] for i in range(len(S)-1,-1,-1)])
ans = 0
for i in range(len(S)//2):
    if(S[i] != T[i]):
        ans += 1
print(ans)

S = input()
T = S[::-1]
cnt = 0
for i in range(len(S)//2):
    if S[i] != T[i]:
        cnt += 1
print(cnt)

#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    S = input()

    num = 0
    for i in range(len(S) // 2):
        num += S[i] != S[-i - 1]
    print(num)


def main():
    solve()


def __starting_point():
    main()

__starting_point()

S=input()
cnt=0
for i in range(len(S)//2):
    cnt+=S[i]!=S[-i-1]
print(cnt)


S = input()
cnt = 0
N = len(S)
for i in range(N//2):
  if S[i] != S[N-i-1]:
    cnt += 1
print(cnt)

def answer(s: str) -> int:
    count = 0
    for i in range(len(s) // 2):
        if s[i] != s[-i - 1]:
            count += 1

    return count


def main():
    s = input()
    print((answer(s)))


def __starting_point():
    main()

__starting_point()

S = input()
ans = 0

for i in range(0,len(S)//2):
    if S[i] != S[len(S)-1-i]:
        ans += 1

print(ans)

import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 1
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"

S = v()

a = len(S)

if a % 2 == 0:
    ra = a//2
else:
    ra = a//2

for i in range(ra):
    if S[i] != S[-(i+1)]:
        cnt += 1

print(cnt)

S=input()
answer=0

if S==S[::-1]:
  print(0)
  return
  
for i in range(len(S)//2):
  if S[i]!=S[-(i+1)]:
    answer+=1
print(answer)

moji = str(input())
N = len(moji)
FM = moji[:N//2]
if N % 2 == 0:
    LM = moji[-1:(N//2)-1:-1]
else:
    LM = moji[-1:(N//2):-1]
ct = 0

for i in range(N//2):
    if FM[i] != LM[i]:
        ct += 1

print(ct)
    


A = input()
import math
times = math.ceil(len(A)/2)
count = 0
for i in range(times):
  if A[i] != A[len(A)-1-i]:
    count += 1
print(count)

a = list(input())
b = a[::-1]
count = 0
for i in range(len(a)):
	if a[i]!=b[i]:
		count += 1
		
print(count//2)

#!/usr/bin/env python3
def main():
    S = input()

    ans = 0
    for i in range(len(S)):
        if S[i] != S[-(i + 1)]:
            ans += 1
    print((ans // 2))


def __starting_point():
    main()

__starting_point()

s = input()
cnt = 0
for i in range(len(s)//2):
    if s[i]!=s[-(i+1)]:
        cnt += 1
print(cnt)

S=input();print(sum(a!=b for a,b in zip(S,S[::-1]))//2)

s=input()
ans = 0
for i in range(len(s)//2):
 if s[i] != s[len(s)-1-i]:
  ans+=1

print(ans)

S = input()
length = len(S)
if length % 2 == 0:
    length = int(length / 2)
    S_half_1 = S[:length]
    S_half_2 = S[(length):]
    S_half_2 = S_half_2[::-1]
else:
    length = int(length // 2)
    S_half_1 = S[:length]
    S_half_2 = S[(length + 1) :]
    S_half_2 = S_half_2[::-1]

ans = 0
for i in range(length):
    if S_half_1[i] != S_half_2[i]:
        ans += 1
print(ans)


S = input()
n = len(S)
c = 0
for i in range(n // 2):
    if S[i] != S[n - i - 1]:
        c += 1
print(c)

s = input()

s = " " + s

ans = 0

if len(s) % 2 == 0:
    for i in range(1, len(s) // 2 + 1):
        if s[i] != s[i * -1]:
            ans += 1
else:
    for i in range(1, len(s) // 2 + 1):
        if s[i] != s[i * -1]:
            ans += 1

print(ans)

s = input()
cau = 0
l = len(s)
for j in range(l // 2 + l % 2):
    if s[j] != s[ -1 - j]:
        cau = cau + 1
    
print(cau)

s=str(input())
n=len(s)
cnt=0
for i in range(n//2):
  if s[i]!=s[n-1-i]:
    cnt+=1
    
print(cnt)

s = input()
ans = 0
for i in range(len(s)//2):
  if s[i] != s[-1-i]:
    ans += 1
print(ans)


s=input()
cnt=0
for i in range(len(s)//2):
    if s[i]!=s[-(i+1)]:
        cnt+=1
print(cnt)


S = input()

N = len(S)
ans = 0
for i in range(N//2):
  if S[i] != S[N-i-1]: ans += 1
    
print(ans)

S = input()

cnt = 0
for i in range(int(len(S)/2)):
    if S[i] == S[len(S)-1-i]:
        continue
    else:
        cnt += 1
        #print(i, S[i], S[len(S)-1-i])
print(cnt)

from sys import stdin, stdout # only need for big input

def solve():
    s = input() 
    left = 0
    right = len(s) - 1
    count = 0
    while left < right:
        count += (s[left] != s[right])
        left += 1
        right -= 1
    print(count)

def main():
    solve()


def __starting_point():
    main()
__starting_point()

S=input()
cnt = 0
for i in range(len(S)//2):
    if S[i] != S[len(S) - i - 1]:
        cnt += 1
print(cnt)

a = list(input())
num = len(a)
count = 0
for i in range(len(a)//2):
    if a[i] == a[num-1-i]:
      pass
    else:
      count+=1
print(count)

s = input()

a = 0
i = 0

while i < len(s)/2:
    if s[i] != s[-i-1]:
        a += 1
    i += 1

print(a)


def main():
   S = input()
   count = 0
   for i in range(int(len(S)//2)):
      if(S[i] != S[-i-1]):
         count+=1
   print(count)

def __starting_point():
    main()


__starting_point()

A=input()
c=0
B=A[::-1]
for i in range(len(A)):
    if A[i]!=B[i]:
        c+=1
print(c//2)

s = input()
mid = len(s)//2
q = s[:mid]
if len(s)%2 == 0:
    t = list(s[mid:])
else:
    t = list(s[mid+1:])

t.reverse()
cnt = 0

for i in range(mid):
    cnt += s[i] != t[i]

print(cnt)

n = input()
num = len(n) // 2
ans = 0
for i in range(num):
  if n[i] != n[len(n)-1-i]:
    ans += 1
print(ans)


s = input()
ans=0
for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
        ans+=1

print(ans)


s = list(input())
Le = len(s)//2
front = s[:Le+1]
back = s[-Le:]
count=0
for i in range(Le):
    if front[i] != back[-1-i]:
        count+=1
print(count)

def resolve():
    s = input()
    n = len(s)
    a = s[:n//2]
    b = s[::-1][:n//2]
    cnt = 0
    for i in range(len(a)):
        if a[i] != b[i]:
            cnt += 1
    print(cnt)
resolve()

S = input()
s1 = S[:len(S)//2]
s2 = S[len(S)//2+len(S)%2:]
s2 = s2[::-1]
count = 0
for i in range(len(s1)):
  if s1[i] != s2[i]:
    count += 1
print(count)

s=list(input())
r=list(reversed(s))
c=0

for i in range(len(s)):
  if s[i]!=r[i]:
    c+=1

print(c//2)

list_s = list(input())
count = 0
for i in range(0, len(list_s) // 2):
    if list_s[i] == list_s[0 - (i + 1)]:
        continue
    else: count += 1
print(count)

s = input()
ans = 0
for i in range(len(s) // 2):
  if s[i] != s[len(s)-i-1]:
    ans += 1
print(ans)

s = input()
r_s = s[::-1]
cnt = 0
for a, b in zip(s,r_s):
  if a != b: cnt+=1
print(cnt//2)

S = input()
dis = len(S)-1
ans = 0
for i in range(len(S)//2):
    if S[i] != S[dis]:
        ans += 1
    dis -= 1
        
    
print(ans)

S = input()
ans = 0
for i in range(len(S)):
  if S[i] != S[-1*(i+1)]:
    ans += 1
print(ans//2)

s=input()
hug=0
for i in range(len(s)//2):
  if s[i]!=s[len(s)-i-1]:
    hug+=1
print(hug)

S = str(input())

N = len(S)
half = (N+1) // 2
ans = 0
for i in range(half):
  if S[i] != S[N-1-i]:
    ans += 1
print(ans)

import sys


def resolve(in_):
    S = next(in_).strip()

    ans = 0
    for a, b in zip(S[:len(S) // 2], reversed(S)):
        if a != b:
            ans += 1

    return ans


def main():
    answer = resolve(sys.stdin)
    print(answer)


def __starting_point():
    main()

__starting_point()

s, hug = input(), 0
for i in range(len(s) // 2):
	if s[i] != s[-(i+1)]:
		hug += 1
print(hug)

s = input()

if len(s) % 2 == 0:
    s1 = s[:len(s) // 2]
    s2 = s[:len(s) // 2 - 1:-1]
else:
    s1 = s[:len(s) // 2]
    s2 = s[:len(s) // 2:-1]

ans = 0
for i in range(len(s1)):
    if s1[i] != s2[i]:
        ans += 1

print(ans)


S=input();N=len(S);print(sum(S[i]!=S[N-i-1] for i in range(N//2)))

s = input()
a = 0
for i in range(len(s) // 2):
    if s[i] != s[-(i + 1)]:
        a += 1
print(a)

S=input()
print(sum(i!=j for i,j in zip(S,S[::-1]))//2)

import math
import collections
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s = input()

cnt = 0
for i in range(len(s)//2):
    if s[i] != s[-1-i]:
        cnt += 1
print(cnt)

s = input()
count = 0
for i in range(len(s)//2):
    if s[i] != s[-(i + 1)]:
        count+= 1
print(count)

S = input()
l = len(S)
ans = 0
for i in range(l//2):
  if S[i] != S[-i-1]:
    ans += 1
print(ans)

S = input()
T = S[::-1]
cnt = 0
for i in range(len(S)//2):
    if S[i] != T[i]:
        cnt += 1
print(cnt)

s=input()
ans=0
n=len(s)
for i in range((n+1)//2):
    if s[i]!=s[-i-1]:
        ans+=1
print(ans)

s = input()
ans = 0
for i in range(len(s)//2):
    if s[i] != s[-1-i]:
        ans += 1
print(ans)

s = input()
t = 0
for i in range(len(s)):
  if s[i] != s[::-1][i]:
    t += 1
print(t//2)

S=input()

def ans147(S:str):
    def_count=0
    for i in range(int(len(S)/2)):
        if S[i]!=S[-(i+1)]:
            def_count+=1
    return def_count
print(ans147(S))