#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 main() {
  int n;
  scanf("%d", &n);
  int c = 0;
  c = n / 5;
  n = n % 5;
  c = c + n / 4;
  n = n % 4;
  c = c + n / 3;
  n = n % 3;
  c = c + n / 2;
  n = n % 2;
  c = c + n / 1;
  n = n % 1;
  printf("%d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%esi
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x21,%rdx
add    %eax,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ecx
mov    %ecx,%ebx
sar    $0x7,%bl
shr    $0x6,%bl
add    %cl,%bl
mov    %ebx,%eax
sar    $0x2,%al
movsbl %al,%eax
add    %edx,%eax
and    $0xfc,%bl
sub    %bl,%cl
movsbl %cl,%ecx
imul   $0x56,%ecx,%edx
movzwl %dx,%edx
mov    %edx,%esi
shr    $0xf,%esi
shr    $0x8,%edx
add    %sil,%dl
movsbl %dl,%edx
add    %edx,%eax
movzbl %dl,%edx
lea    (%rdx,%rdx,2),%edx
sub    %dl,%cl
mov    %ecx,%ebx
shr    $0x7,%bl
add    %cl,%bl
mov    %ebx,%edx
sar    %dl
movsbl %dl,%edx
add    %eax,%edx
and    $0xfe,%bl
sub    %bl,%cl
movsbl %cl,%esi
add    %edx,%esi
movl   $0x0,0x4(%rsp)
mov    %r14,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 5
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 5
store i32 %8, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 4
%12 = add nsw i32 %9, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = srem i32 %13, 4
store i32 %14, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = sdiv i32 %16, 3
%18 = add nsw i32 %15, %17
store i32 %18, i32* %3
%19 = load i32, i32* %2
%20 = srem i32 %19, 3
store i32 %20, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = sdiv i32 %22, 2
%24 = add nsw i32 %21, %23
store i32 %24, i32* %3
%25 = load i32, i32* %2
%26 = srem i32 %25, 2
store i32 %26, i32* %2
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = sdiv i32 %28, 1
%30 = add nsw i32 %27, %29
store i32 %30, i32* %3
%31 = load i32, i32* %2
%32 = srem i32 %31, 1
store i32 %32, i32* %2
%33 = load i32, i32* %3
%34 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %33)
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 = sdiv i32 %4, 5
%6 = srem i32 %4, 5
%7 = trunc i32 %6 to i8
%8 = sdiv i8 %7, 4
%9 = sext i8 %8 to i32
%10 = add nsw i32 %5, %9
%11 = srem i8 %7, 4
%12 = sdiv i8 %11, 3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %10, %13
%15 = srem i8 %11, 3
%16 = sdiv i8 %15, 2
%17 = sext i8 %16 to i32
%18 = add nsw i32 %14, %17
%19 = srem i8 %15, 2
%20 = sext i8 %19 to i32
%21 = add nsw i32 %18, %20
store i32 0, i32* %1
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %21)
ret i32 0
}