program main
	implicit none
	integer n,m,l
	read(*,*)n,m
	l=(n-1)*(m-1)
	if(l<10)then
		write(*,'(i1)')l
	elseif(l<100)then
		write(*,'(i2)')l
	elseif(l<1000)then
		write(*,'(i3)')l
	else
		write(*,'(i4)')l
	endif
end program main

; 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.bc67b408fb497961a5f558c5c3eaec76 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7054/source.f\00"
@_QQcl.28693129 = linkonce constant [4 x i8] c"(i1)"
@_QQcl.28693229 = linkonce constant [4 x i8] c"(i2)"
@_QQcl.28693329 = linkonce constant [4 x i8] c"(i3)"
@_QQcl.28693429 = linkonce constant [4 x i8] c"(i4)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.bc67b408fb497961a5f558c5c3eaec76, i32 4)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 4)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = load i32, ptr %2, align 4, !tbaa !3
  %8 = add i32 %7, -1
  %9 = load i32, ptr %1, align 4, !tbaa !3
  %10 = add i32 %9, -1
  %11 = mul i32 %10, %8
  %12 = icmp slt i32 %11, 10
  br i1 %12, label %13, label %15

13:                                               ; preds = %0
  %14 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693129, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.bc67b408fb497961a5f558c5c3eaec76, i32 7)
  br label %25

15:                                               ; preds = %0
  %16 = icmp ult i32 %11, 100
  br i1 %16, label %17, label %19

17:                                               ; preds = %15
  %18 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693229, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.bc67b408fb497961a5f558c5c3eaec76, i32 9)
  br label %25

19:                                               ; preds = %15
  %20 = icmp ult i32 %11, 1000
  br i1 %20, label %21, label %23

21:                                               ; preds = %19
  %22 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693329, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.bc67b408fb497961a5f558c5c3eaec76, i32 11)
  br label %25

23:                                               ; preds = %19
  %24 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693429, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.bc67b408fb497961a5f558c5c3eaec76, i32 13)
  br label %25

25:                                               ; preds = %13, %17, %21, %23
  %.sink7 = phi ptr [ %14, %13 ], [ %18, %17 ], [ %22, %21 ], [ %24, %23 ]
  %26 = call i1 @_FortranAioOutputInteger32(ptr %.sink7, i32 %11)
  %27 = call i32 @_FortranAioEndIoStatement(ptr %.sink7)
  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 @_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"}
