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

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

-N = len(S) -print((sum(S[i] != S[N - i - 1] for i in range(N // 2)))) +print((sum(a != b for a, b in zip(S, S[::-1])) // 2))