#import <stdio.h>
#import <string.h>
int main() {
  char s[102];
  fgets(s, 102, stdin);
  int n = strlen(s);
  s[--n] = '\0';
  int i = 0, j = n - 1;
  int cnt = 0;
  while (i < j) {
    if (s[i] != s[j]) {
      ++cnt;
    }
    ++i;
    --j;
  }
  printf("%d\n", cnt);
  return 0;
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_187/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_187/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@stdin = external local_unnamed_addr global ptr, align 8
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %s = alloca [102 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 102, ptr nonnull %s) #4
  %0 = load ptr, ptr @stdin, align 8, !tbaa !5
  %call = call ptr @fgets(ptr noundef nonnull %s, i32 noundef 102, ptr noundef %0)
  %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5
  %conv = trunc i64 %call2 to i32
  %dec = shl i64 %call2, 32
  %sext = add i64 %dec, -4294967296
  %idxprom = ashr exact i64 %sext, 32
  %arrayidx = getelementptr inbounds [102 x i8], ptr %s, i64 0, i64 %idxprom
  store i8 0, ptr %arrayidx, align 1, !tbaa !9
  %cmp21 = icmp sgt i32 %conv, 2
  br i1 %cmp21, label %while.body.preheader, label %while.end

while.body.preheader:                             ; preds = %entry
  %sub = shl i64 %call2, 32
  %sext30 = add i64 %sub, -8589934592
  %1 = ashr exact i64 %sext30, 32
  br label %while.body

while.body:                                       ; preds = %while.body.preheader, %while.body
  %indvars.iv25 = phi i64 [ 0, %while.body.preheader ], [ %indvars.iv.next26, %while.body ]
  %indvars.iv = phi i64 [ %1, %while.body.preheader ], [ %indvars.iv.next, %while.body ]
  %cnt.024 = phi i32 [ 0, %while.body.preheader ], [ %spec.select, %while.body ]
  %arrayidx5 = getelementptr inbounds [102 x i8], ptr %s, i64 0, i64 %indvars.iv25
  %2 = load i8, ptr %arrayidx5, align 1, !tbaa !9
  %arrayidx8 = getelementptr inbounds [102 x i8], ptr %s, i64 0, i64 %indvars.iv
  %3 = load i8, ptr %arrayidx8, align 1, !tbaa !9
  %cmp10.not = icmp ne i8 %2, %3
  %inc = zext i1 %cmp10.not to i32
  %spec.select = add nuw nsw i32 %cnt.024, %inc
  %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %cmp = icmp slt i64 %indvars.iv.next26, %indvars.iv.next
  br i1 %cmp, label %while.body, label %while.end

while.end:                                        ; preds = %while.body, %entry
  %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %while.body ]
  %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %cnt.0.lcssa)
  call void @llvm.lifetime.end.p0(i64 102, ptr nonnull %s) #4
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
