program tenquestiontwo
 implicit none
 character(3) s
 integer i, n, res
 res = 0
 read(*,*) s
  do 10 i = 1,3
  read(s(i:i),*) n
   if (n.EQ.1) then
   res = res + 1
   end if
  10 continue
 write(*,*) res 
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"

@_QQcl.bba35446d776a0d442ae3a4ed2360b1e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6587/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca [3 x i8], align 1
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.bba35446d776a0d442ae3a4ed2360b1e, i32 6)
  %4 = call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull %2, i64 3)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %2, i64 1, ptr null, i64 0, ptr nonnull @_QQcl.bba35446d776a0d442ae3a4ed2360b1e, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %1, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = load i32, ptr %1, align 4, !tbaa !3
  %10 = icmp eq i32 %9, 1
  %11 = zext i1 %10 to i32
  %12 = getelementptr inbounds [3 x [1 x i8]], ptr %2, i64 0, i64 1
  %13 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %12, i64 1, ptr null, i64 0, ptr nonnull @_QQcl.bba35446d776a0d442ae3a4ed2360b1e, i32 8)
  %14 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %1, i32 4)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %16 = load i32, ptr %1, align 4, !tbaa !3
  %17 = icmp eq i32 %16, 1
  %18 = zext i1 %17 to i32
  %spec.select.1 = add nuw nsw i32 %11, %18
  %19 = getelementptr inbounds [3 x [1 x i8]], ptr %2, i64 0, i64 2
  %20 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %19, i64 1, ptr null, i64 0, ptr nonnull @_QQcl.bba35446d776a0d442ae3a4ed2360b1e, i32 8)
  %21 = call i1 @_FortranAioInputInteger(ptr %20, ptr nonnull %1, i32 4)
  %22 = call i32 @_FortranAioEndIoStatement(ptr %20)
  %23 = load i32, ptr %1, align 4, !tbaa !3
  %24 = icmp eq i32 %23, 1
  %25 = zext i1 %24 to i32
  %spec.select.2 = add nuw nsw i32 %spec.select.1, %25
  %26 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.bba35446d776a0d442ae3a4ed2360b1e, i32 13)
  %27 = call i1 @_FortranAioOutputInteger32(ptr %26, i32 %spec.select.2)
  %28 = call i32 @_FortranAioEndIoStatement(ptr %26)
  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 ptr @_FortranAioBeginInternalListInput(ptr, i64, ptr, i64, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) 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"}
