program contest
  implicit none

  integer :: n, i, j, p, q

  read(*,*) n
  
  q = 0

  do j = 1, n, 2
     p = 0
     do i = 1, j
        if(mod(j,i)==0) then
           p = p + 1
        end if
     end do
     if(p == 8) then
        q = q + 1
!        write(*,*) j
     end if
  end do

  write(*,*) q
  stop
end program contest

; 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.9398468233c2d53df29cb8b9a4c163fa = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5639/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9398468233c2d53df29cb8b9a4c163fa, i32 6)
  %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 %.lr.ph17.preheader, label %._crit_edge18

.lr.ph17.preheader:                               ; preds = %0
  %.lhs.trunc = add i32 %5, 1
  %7 = lshr i32 %.lhs.trunc, 1
  %.zext = zext i32 %7 to i64
  br label %.lr.ph17

.lr.ph17:                                         ; preds = %.lr.ph17.preheader, %._crit_edge
  %indvar = phi i64 [ 0, %.lr.ph17.preheader ], [ %indvar.next, %._crit_edge ]
  %8 = phi i64 [ %.zext, %.lr.ph17.preheader ], [ %28, %._crit_edge ]
  %9 = phi i32 [ 1, %.lr.ph17.preheader ], [ %27, %._crit_edge ]
  %.015 = phi i32 [ 0, %.lr.ph17.preheader ], [ %spec.select13, %._crit_edge ]
  %10 = shl nuw nsw i64 %indvar, 1
  %11 = icmp sgt i32 %9, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph17
  %12 = icmp eq i64 %indvar, 0
  br i1 %12, label %.lr.ph.epil, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %13 = phi i32 [ %21, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %.0914 = phi i32 [ %spec.select.1, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %14 = srem i32 %9, %13
  %15 = icmp eq i32 %14, 0
  %16 = zext i1 %15 to i32
  %spec.select = add i32 %.0914, %16
  %17 = add nuw i32 %13, 1
  %18 = srem i32 %9, %17
  %19 = icmp eq i32 %18, 0
  %20 = zext i1 %19 to i32
  %spec.select.1 = add i32 %spec.select, %20
  %21 = add nuw i32 %13, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %10
  br i1 %niter.ncmp.1.not, label %.lr.ph.epil, label %.lr.ph

.lr.ph.epil:                                      ; preds = %.lr.ph, %.lr.ph.preheader
  %spec.select.lcssa.ph = phi i32 [ undef, %.lr.ph.preheader ], [ %spec.select.1, %.lr.ph ]
  %.unr20 = phi i32 [ 1, %.lr.ph.preheader ], [ %21, %.lr.ph ]
  %.0914.unr = phi i32 [ 0, %.lr.ph.preheader ], [ %spec.select.1, %.lr.ph ]
  %22 = srem i32 %9, %.unr20
  %23 = icmp eq i32 %22, 0
  %24 = zext i1 %23 to i32
  %spec.select.epil = add i32 %.0914.unr, %24
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %.lr.ph17
  %.09.lcssa = phi i32 [ 0, %.lr.ph17 ], [ %spec.select.epil, %.lr.ph.epil ]
  %25 = icmp eq i32 %.09.lcssa, 8
  %26 = zext i1 %25 to i32
  %spec.select13 = add i32 %.015, %26
  %27 = add nuw i32 %9, 2
  %28 = add nsw i64 %8, -1
  %29 = icmp sgt i64 %8, 1
  %indvar.next = add i64 %indvar, 1
  br i1 %29, label %.lr.ph17, label %._crit_edge18

._crit_edge18:                                    ; preds = %._crit_edge, %0
  %.0.lcssa = phi i32 [ 0, %0 ], [ %spec.select13, %._crit_edge ]
  %30 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.9398468233c2d53df29cb8b9a4c163fa, i32 23)
  %31 = call i1 @_FortranAioOutputInteger32(ptr %30, i32 %.0.lcssa)
  %32 = call i32 @_FortranAioEndIoStatement(ptr %30)
  %33 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

attributes #0 = { noreturn }

!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"}
