program palindrome_philia
  implicit none
  character(100) :: s
  integer :: n, i, m = 0
  read(*,*) s
  n = len_trim(s)
  do i = 1, n/2
    if (s(i:i) /= s(n-i+1:n-i+1)) m = m+1
  end do
  write(*,'(i0)') m
end program palindrome_philia