#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 *, int);
int /*<<< orphan*/ scanf(char *, int *);
int sqrt(int);
int main() {
  int n;
  scanf("%d", &n);
  int i, j, c = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= sqrt(i); j++) {
      if (i % j == 0)
        c++;
    }
  }
  printf("%d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ca <main+0x9a>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <sqrt@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jg     11b7 <main+0x87>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    11a4 <main+0x74>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a9 <main+0x79>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1170 <main+0x40>
jmp    11bc <main+0x8c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <main+0x2d>
mov    -0x14(%rbp),%esi
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    119e <main+0x6e>
mov    $0x1,%r14d
xor    %ebx,%ebx
jmp    116e <main+0x3e>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r14),%eax
cmp    0xc(%rsp),%r14d
mov    %eax,%r14d
jge    11a0 <main+0x70>
mov    %r14d,%edi
call   1050 <sqrt@plt>
test   %eax,%eax
jle    1160 <main+0x30>
xor    %ebp,%ebp
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r14d,%eax
xor    %edx,%edx
div    %ebp
cmp    $0x1,%edx
adc    $0x0,%ebx
mov    %r14d,%edi
call   1050 <sqrt@plt>
cmp    %eax,%ebp
jl     1180 <main+0x50>
jmp    1160 <main+0x30>
xor    %ebx,%ebx
lea    0xe59(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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