#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 *, int *);
int main() {
  int A, B, C, qtd = 0;
  scanf(" %d %d %d", &A, &B, &C);
  while ((A >= 2) && (B >= 3) && (C >= 5)) {
    A -= 2;
    B -= 3;
    C -= 5;
    qtd++;
  }
  printf("%d", qtd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x15(%rbp)
jl     1176 <main+0x56>
xor    %eax,%eax
cmpl   $0x3,-0xc(%rbp)
mov    %al,-0x15(%rbp)
jl     1176 <main+0x56>
cmpl   $0x5,-0x10(%rbp)
setge  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1186 <main+0x66>
jmp    11af <main+0x8f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <main+0x2e>
mov    -0x14(%rbp),%esi
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%ecx
xor    %esi,%esi
cmp    $0x2,%ecx
jl     1212 <main+0xf2>
mov    0x10(%rsp),%r10d
cmp    $0x3,%r10d
jl     1212 <main+0xf2>
mov    0xc(%rsp),%edx
cmp    $0x5,%edx
jl     1212 <main+0xf2>
cmp    $0x3,%ecx
mov    $0x3,%esi
cmovl  %ecx,%esi
neg    %esi
lea    (%rcx,%rsi,1),%r8d
add    $0x1,%r8d
mov    %r8d,%edi
shr    %edi
cmp    $0x5,%r10d
mov    $0x5,%esi
cmovl  %r10d,%esi
neg    %esi
lea    (%r10,%rsi,1),%r9d
add    $0x2,%r9d
mov    $0xaaaaaaab,%esi
imul   %r9,%rsi
shr    $0x21,%rsi
cmp    $0x9,%edx
mov    $0x9,%eax
cmovl  %edx,%eax
neg    %eax
lea    (%rdx,%rax,1),%r11d
add    $0x4,%r11d
mov    $0xcccccccd,%eax
imul   %r11,%rax
shr    $0x22,%rax
cmp    %esi,%eax
cmovb  %eax,%esi
cmp    %edi,%esi
cmovae %edi,%esi
xor    %eax,%eax
cmp    $0x3,%r9d
cmovb  %eax,%esi
cmp    $0x2,%r8d
cmovb  %eax,%esi
lea    (%rsi,%rsi,1),%eax
neg    %eax
add    %ecx,%eax
add    $0xfffffffe,%eax
lea    (%rsi,%rsi,2),%ecx
lea    (%rsi,%rsi,4),%edi
neg    %edi
add    %edi,%edx
add    $0xfffffffb,%edx
neg    %ecx
add    %r10d,%ecx
add    $0xfffffffd,%ecx
add    $0x1,%esi
mov    %eax,0x14(%rsp)
mov    %ecx,0x10(%rsp)
mov    %edx,0xc(%rsp)
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c" %d %d %d\00"
@.str.1 = [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
store i32 0, i32* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 2
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 3
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 5
br label %16
16: ; preds = %13, %10, %7
%17 = phi i1 [ false, %10 ], [ false, %7 ], [ %15, %13 ]
br i1 %17, label %18, label %27
18: ; preds = %16
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 2
store i32 %20, i32* %2
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 3
store i32 %22, i32* %3
%23 = load i32, i32* %4
%24 = sub nsw i32 %23, 5
store i32 %24, i32* %4
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %7
27: ; preds = %16
%28 = load i32, i32* %5
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c" %d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sgt i32 %8, 1
%12 = icmp sgt i32 %9, 2
%13 = select i1 %11, i1 %12, i1 false
%14 = icmp sgt i32 %10, 4
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %16, label %45
16: ; preds = %0
%17 = add nsw i32 %8, -2
%18 = add nuw i32 %8, 1
%19 = call i32 @llvm.smin.i32(i32 %8, i32 3)
%20 = sub nuw i32 %18, %19
%21 = lshr i32 %20, 1
%22 = add nuw i32 %9, 2
%23 = call i32 @llvm.smin.i32(i32 %9, i32 5)
%24 = sub nuw i32 %22, %23
%25 = udiv i32 %24, 3
%26 = add nuw i32 %10, 4
%27 = call i32 @llvm.smin.i32(i32 %10, i32 9)
%28 = sub nuw i32 %26, %27
%29 = udiv i32 %28, 5
%30 = icmp ult i32 %20, 2
%31 = icmp ult i32 %24, 3
%32 = select i1 %30, i1 true, i1 %31
%33 = call i32 @llvm.umin.i32(i32 %29, i32 %25)
%34 = call i32 @llvm.umin.i32(i32 %33, i32 %21)
%35 = select i1 %32, i32 0, i32 %34
%36 = mul nsw i32 %35, -2
%37 = add nsw i32 %36, %17
%38 = mul nsw i32 %35, -3
%39 = add nsw i32 %10, -5
%40 = mul nsw i32 %35, -5
%41 = add nsw i32 %40, %39
%42 = add nsw i32 %9, -3
%43 = add nsw i32 %38, %42
%44 = add nuw nsw i32 %35, 1
store i32 %37, i32* %1
store i32 %43, i32* %2
store i32 %41, i32* %3
br label %45
45: ; preds = %16, %0
%46 = phi i32 [ %44, %16 ], [ 0, %0 ]
%47 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %46)
ret i32 0
}