character(6)mon
integer cnt
read*,mon
cnt=0
do i=1,6
  if(mon(i:i)=="1")cnt=cnt+1
end do
print"(i0)",cnt
end
; 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.236d2bb249890e5752a5c0cdce556014 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6857/source.f\00"
@_QQcl.31 = linkonce constant [1 x i8] c"1"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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