program ABC136B
    implicit none
    integer::N,i,digits,j,ans=0
    read*,N
    do i=1,N
        j=i
        digits=1
        do
            if(j/10==0)exit
            j=j/10
            digits=digits+1
        end do
        if(mod(digits,2)==1)ans=ans+1
    end do
    print'(i0)',ans
end program ABC136B
; 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"

@_QFEans = internal unnamed_addr global i32 0
@_QQcl.eb627c9b8e9804a0fce03f406619acb4 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3576/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 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.eb627c9b8e9804a0fce03f406619acb4, i32 4)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.preheader.preheader, label %._crit_edge17

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

.preheader:                                       ; preds = %.preheader.preheader, %12
  %.0816 = phi i32 [ %14, %12 ], [ 1, %.preheader.preheader ]
  %7 = phi i32 [ %13, %12 ], [ %_QFEans.promoted, %.preheader.preheader ]
  %8 = icmp ult i32 %.0816, 10
  br i1 %8, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %9 = and i32 %16, -2147483647
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %._crit_edge.thread, label %12

._crit_edge.thread:                               ; preds = %.preheader, %._crit_edge
  %11 = add i32 %7, 1
  store i32 %11, ptr @_QFEans, align 4, !tbaa !3
  br label %12

12:                                               ; preds = %._crit_edge.thread, %._crit_edge
  %13 = phi i32 [ %11, %._crit_edge.thread ], [ %7, %._crit_edge ]
  %14 = add nuw i32 %.0816, 1
  %exitcond.not = icmp eq i32 %.0816, %5
  br i1 %exitcond.not, label %._crit_edge17, label %.preheader

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.014 = phi i32 [ %15, %.lr.ph ], [ %.0816, %.preheader ]
  %.0913 = phi i32 [ %16, %.lr.ph ], [ 1, %.preheader ]
  %15 = sdiv i32 %.014, 10
  %16 = add i32 %.0913, 1
  %.0.off = add nsw i32 %15, 9
  %17 = icmp ult i32 %.0.off, 19
  br i1 %17, label %._crit_edge, label %.lr.ph

._crit_edge17:                                    ; preds = %12, %0
  %18 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.eb627c9b8e9804a0fce03f406619acb4, i32 15)
  %19 = load i32, ptr @_QFEans, align 4, !tbaa !3
  %20 = call i1 @_FortranAioOutputInteger32(ptr %18, i32 %19)
  %21 = call i32 @_FortranAioEndIoStatement(ptr %18)
  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"}
