#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 a, b, c, d;
  d = 1;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  if ((a - b) * (b - c) == 0) {
    if (a == c) {
      d = 3;
    } else {
      d = 2;
    }
  } else if (a == c) {
    d = 2;
  }
  printf("%d", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
imul   %ecx,%eax
cmp    $0x0,%eax
jne    11a2 <main+0x82>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1196 <main+0x76>
movl   $0x3,-0x14(%rbp)
jmp    119d <main+0x7d>
movl   $0x2,-0x14(%rbp)
jmp    11ba <main+0x9a>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11b5 <main+0x95>
movl   $0x2,-0x14(%rbp)
jmp    11ba <main+0x9a>
mov    -0x14(%rbp),%esi
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    %eax,%edx
sub    %ecx,%edx
mov    0x4(%rsp),%esi
sub    %esi,%ecx
imul   %edx,%ecx
xor    %edx,%edx
test   %ecx,%ecx
sete   %dl
xor    %ecx,%ecx
cmp    %esi,%eax
sete   %cl
lea    (%rdx,%rcx,1),%esi
add    $0x1,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
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
store i32 1, i32* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = mul nsw i32 %11, %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %0
%18 = load i32, i32* %2
%19 = load i32, i32* %4
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 3, i32* %5
br label %23
22: ; preds = %17
store i32 2, i32* %5
br label %23
23: ; preds = %22, %21
br label %30
24: ; preds = %0
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp eq i32 %25, %26
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 2, i32* %5
br label %29
29: ; preds = %28, %24
br label %30
30: ; preds = %29, %23
%31 = load i32, i32* %5
%32 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %3
%14 = sub nsw i32 %11, %13
%15 = mul nsw i32 %14, %12
%16 = icmp eq i32 %15, 0
%17 = icmp eq i32 %10, %13
%18 = select i1 %17, i32 3, i32 2
%19 = select i1 %17, i32 2, i32 1
%20 = select i1 %16, i32 %18, i32 %19
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}