program main

  implicit none
  character(100) :: s
  integer :: i,n, ls

  read(*,*) s
  ls = len_trim( s )

  n = 0
  do i = 1, ls/2
    if ( s(i:i) == s(ls+1-i:ls+1-i) ) then
    else
      n = n + 1
    end if
  end do
  print*, n

end program main