#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int /*<<< orphan*/ scanf(char *, unsigned long *);
int main(int argc, char const *argv[]) {
  unsigned long int area = 0, stars, i, ct = 0, buff;
  scanf(" %lu", &area);
  scanf(" %lu", &stars);
  for (i = 0; i < stars; ++i) {
    scanf(" %lu", &buff);
    if (buff * area >= 40000000)
      ct++;
  }
  printf("%d\n", ct);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x30(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    11c3 <main+0xa3>
lea    0xe7d(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x38(%rbp),%rax
imul   -0x18(%rbp),%rax
cmp    $0x2625a00,%rax
jb     11ad <main+0x8d>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11b2 <main+0x92>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    116e <main+0x4e>
mov    -0x30(%rbp),%rsi
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
lea    0xec5(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
cmpq   $0x0,(%rsp)
je     119c <main+0x7c>
xor    %r12d,%r12d
lea    0xe9c(%rip),%r14
lea    0x10(%rsp),%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%rax
imul   0x10(%rsp),%rax
cmp    $0x2625a00,%rax
sbb    $0xffffffffffffffff,%r12
add    $0x1,%rbx
cmp    (%rsp),%rbx
jb     1170 <main+0x50>
jmp    119f <main+0x7f>
xor    %r12d,%r12d
lea    0xe5f(%rip),%rdi
mov    %r12,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %lu\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
store i64 0, i64* %9
%11 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %6)
%12 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %7)
store i64 0, i64* %8
br label %13
13: ; preds = %27, %2
%14 = load i64, i64* %8
%15 = load i64, i64* %7
%16 = icmp ult i64 %14, %15
br i1 %16, label %17, label %30
17: ; preds = %13
%18 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %10)
%19 = load i64, i64* %10
%20 = load i64, i64* %6
%21 = mul i64 %19, %20
%22 = icmp uge i64 %21, 40000000
br i1 %22, label %23, label %26
23: ; preds = %17
%24 = load i64, i64* %9
%25 = add i64 %24, 1
store i64 %25, i64* %9
br label %26
26: ; preds = %23, %17
br label %27
27: ; preds = %26
%28 = load i64, i64* %8
%29 = add i64 %28, 1
store i64 %29, i64* %8
br label %13
30: ; preds = %13
%31 = load i64, i64* %9
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" %lu\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%7 = bitcast i64* %4 to i8*
%8 = bitcast i64* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %4)
%11 = load i64, i64* %4
%12 = icmp eq i64 %11, 0
br i1 %12, label %26, label %13
13: ; preds = %2, %13
%14 = phi i64 [ %22, %13 ], [ 0, %2 ]
%15 = phi i64 [ %23, %13 ], [ 0, %2 ]
%16 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %5)
%17 = load i64, i64* %5
%18 = load i64, i64* %3
%19 = mul i64 %18, %17
%20 = icmp ugt i64 %19, 39999999
%21 = zext i1 %20 to i64
%22 = add i64 %14, %21
%23 = add nuw i64 %15, 1
%24 = load i64, i64* %4
%25 = icmp ult i64 %23, %24
br i1 %25, label %13, label %26
26: ; preds = %13, %2
%27 = phi i64 [ 0, %2 ], [ %22, %13 ]
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %27)
ret i32 0
}