#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 scanf(char *, int *, ...);
int main() {
  int t, a, b, c, d, e, count;
  while (scanf("%d", &t) == 1) {
    count = 0;
    scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
    if (a == t)
      count++;
    if (b == t)
      count++;
    if (c == t)
      count++;
    if (d == t)
      count++;
    if (e == t)
      count++;
    printf("%d\n", count);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11f0 <main+0xd0>
movl   $0x0,-0x20(%rbp)
lea    0xea8(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x1c(%rbp),%r9
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1188 <main+0x68>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    119d <main+0x7d>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11b2 <main+0x92>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11c7 <main+0xa7>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11dc <main+0xbc>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed7(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11e3 <main+0xc3>
lea    0xc(%rsp),%r13
lea    0x8(%rsp),%rbx
lea    0x4(%rsp),%rbp
lea    0xeb1(%rip),%r14
lea    0xea7(%rip),%r15
mov    %rsp,%r12
nopl   0x0(%rax,%rax,1)
lea    0xe89(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %ecx,%ecx
cmp    %eax,0x14(%rsp)
sete   %cl
lea    0x1(%rcx),%edx
cmp    %eax,0x10(%rsp)
cmovne %ecx,%edx
xor    %ecx,%ecx
cmp    %eax,0xc(%rsp)
sete   %cl
add    %edx,%ecx
xor    %edx,%edx
cmp    %eax,0x8(%rsp)
sete   %dl
add    %ecx,%edx
xor    %esi,%esi
cmp    %eax,0x4(%rsp)
sete   %sil
add    %edx,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1170 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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