PROGRAM ATCODER

implicit none
character(len=10**5) :: s
integer :: count=0,i

read(*,*) s

do i = 1, len_trim(s)-1
  if(s(i:i) /= s(i+1:i+1))then
    count = count + 1
  end if
end do

write(*,'(i0)') count

contains
!!!!!! サブルーチンは↓
!!!!!!

END PROGRAM ATCODER
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
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"

@_QFEcount = internal unnamed_addr global i32 0
@_QFEs = internal global [100000 x i8] undef
@_QQcl.03830ff21452beef9344c4c3fb18d632 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7773/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.03830ff21452beef9344c4c3fb18d632, i32 7)
  %2 = tail call i1 @_FortranAioInputAscii(ptr %1, ptr nonnull @_QFEs, i64 100000)
  %3 = tail call i32 @_FortranAioEndIoStatement(ptr %1)
  br label %4

4:                                                ; preds = %0, %4
  %5 = phi i64 [ 99999, %0 ], [ %9, %4 ]
  %6 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %5
  %7 = load i8, ptr %6, align 1, !tbaa !3
  %8 = icmp eq i8 %7, 32
  %9 = add nsw i64 %5, -1
  %10 = icmp ne i64 %5, 0
  %11 = and i1 %8, %10
  br i1 %11, label %4, label %12

12:                                               ; preds = %4
  %sext = shl i64 %5, 32
  %13 = ashr exact i64 %sext, 32
  %spec.select = select i1 %8, i64 -1, i64 %13
  %14 = icmp sgt i64 %spec.select, 0
  br i1 %14, label %.lr.ph, label %select.unfold._crit_edge

.lr.ph:                                           ; preds = %12, %select.unfold
  %indvars.iv = phi i64 [ %indvars.iv.next, %select.unfold ], [ 1, %12 ]
  %15 = add nsw i64 %indvars.iv, -1
  %16 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %sext6 = shl i64 %indvars.iv.next, 32
  %17 = ashr exact i64 %sext6, 32
  %18 = add nsw i64 %17, -1
  %19 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %18
  %20 = tail call i32 @_FortranACharacterCompareScalar1(ptr %16, ptr %19, i64 1, i64 1)
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %select.unfold, label %21

21:                                               ; preds = %.lr.ph
  %22 = load i32, ptr @_QFEcount, align 4, !tbaa !3
  %23 = add i32 %22, 1
  store i32 %23, ptr @_QFEcount, align 4, !tbaa !3
  br label %select.unfold

select.unfold:                                    ; preds = %21, %.lr.ph
  %exitcond.not = icmp eq i64 %indvars.iv, %spec.select
  br i1 %exitcond.not, label %select.unfold._crit_edge, label %.lr.ph

select.unfold._crit_edge:                         ; preds = %select.unfold, %12
  %24 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.03830ff21452beef9344c4c3fb18d632, i32 15)
  %25 = load i32, ptr @_QFEcount, align 4, !tbaa !3
  %26 = tail call i1 @_FortranAioOutputInteger32(ptr %24, i32 %25)
  %27 = tail call i32 @_FortranAioEndIoStatement(ptr %24)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputAscii(ptr, ptr, i64) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
