PROGRAM WW3
  implicit none
  INTEGER::a,b,n
  INTRINSIC MOD
  character(len=100) w
  b=0
  read(*,*) w
  a = len_trim(w)
  
   DO n=1,a/2
    IF(w(n:n) == w(a+1-n:a+1-n))THEN
     b=b
    ELSE
     b=b+1
    END IF
   END DO
   
  WRITE(*,*) b

END PROGRAM WW3