program c

integer :: n,a(10000),ans=0

read(*,*) n
read(*,*) (a(i),i=1,n)

do i=1,n
	do while (mod(a(i),2)==0)
		a(i) = a(i) / 2
		ans = ans + 1
	enddo
enddo

write(*,*) ans

end program
; 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"

@_QFEa = internal global [10000 x i32] undef
@_QFEans = internal unnamed_addr global i32 0
@_QQcl.28b638d419e6a2069c55ff8673498d4d = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5875/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.28b638d419e6a2069c55ff8673498d4d, i32 5)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.28b638d419e6a2069c55ff8673498d4d, i32 6)
  %6 = load i32, ptr %1, align 4, !tbaa !3
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %8 = zext i32 %6 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %9 = phi i64 [ %14, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %sext = shl i64 %9, 32
  %10 = ashr exact i64 %sext, 32
  %11 = add nsw i64 %10, -1
  %12 = getelementptr [10000 x i32], ptr @_QFEa, i64 0, i64 %11
  %13 = call i1 @_FortranAioInputInteger(ptr %5, ptr %12, i32 4)
  %14 = add nuw nsw i64 %9, 1
  %exitcond.not = icmp eq i64 %9, %8
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %15 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %16 = load i32, ptr %1, align 4, !tbaa !3
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader.preheader, label %._crit_edge17

.preheader.preheader:                             ; preds = %._crit_edge
  %_QFEans.promoted11 = load i32, ptr @_QFEans, align 4, !tbaa !3
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %29
  %.016 = phi i32 [ %30, %29 ], [ 1, %.preheader.preheader ]
  %.lcssa101314 = phi i32 [ %.lcssa1012, %29 ], [ %_QFEans.promoted11, %.preheader.preheader ]
  %18 = sext i32 %.016 to i64
  %19 = add nsw i64 %18, -1
  %20 = getelementptr [10000 x i32], ptr @_QFEa, i64 0, i64 %19
  %.promoted = load i32, ptr %20, align 4, !tbaa !3
  %21 = and i32 %.promoted, 1
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %.lr.ph8, label %29

.lr.ph8:                                          ; preds = %.preheader, %.lr.ph8
  %23 = phi i32 [ %25, %.lr.ph8 ], [ %.promoted, %.preheader ]
  %24 = phi i32 [ %26, %.lr.ph8 ], [ %.lcssa101314, %.preheader ]
  %25 = sdiv i32 %23, 2
  %26 = add i32 %24, 1
  %27 = and i32 %25, 1
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %.lr.ph8, label %._crit_edge9

._crit_edge9:                                     ; preds = %.lr.ph8
  store i32 %25, ptr %20, align 4, !tbaa !3
  store i32 %26, ptr @_QFEans, align 4, !tbaa !3
  br label %29

29:                                               ; preds = %._crit_edge9, %.preheader
  %.lcssa1012 = phi i32 [ %26, %._crit_edge9 ], [ %.lcssa101314, %.preheader ]
  %30 = add nuw i32 %.016, 1
  %exitcond19.not = icmp eq i32 %.016, %16
  br i1 %exitcond19.not, label %._crit_edge17, label %.preheader

._crit_edge17:                                    ; preds = %29, %._crit_edge
  %31 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.28b638d419e6a2069c55ff8673498d4d, i32 15)
  %32 = load i32, ptr @_QFEans, align 4, !tbaa !3
  %33 = call i1 @_FortranAioOutputInteger32(ptr %31, i32 %32)
  %34 = call i32 @_FortranAioEndIoStatement(ptr %31)
  ret void
}

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

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(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"}
