#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, value;
  scanf("%d", &n);
  int freq[100] = {0};
  while (n-- > 0) {
    scanf("%d", &value);
    freq[value]++;
  }
  int i;
  for (i = 0; i < 100; i++)
    if (freq[i] == 1) {
      printf("%d", i);
      break;
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    11a3 <main+0x73>
lea    0xe80(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1a0(%rbp,%rax,4)
jmp    1165 <main+0x35>
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    11ff <main+0xcf>
movslq -0x1a4(%rbp),%rax
cmpl   $0x1,-0x1a0(%rbp,%rax,4)
01
jne    11e6 <main+0xb6>
mov    -0x1a4(%rbp),%esi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    11ff <main+0xcf>
jmp    11eb <main+0xbb>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11ad <main+0x7d>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1a8,%rsp
lea    0xebf(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
lea    0x10(%rsp),%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x8(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x8(%rsp)
test   %eax,%eax
jle    11a4 <main+0x74>
lea    0xe8e(%rip),%r14
lea    0xc(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movslq 0xc(%rsp),%rax
addl   $0x1,0x10(%rsp,%rax,4)
mov    0x8(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x8(%rsp)
test   %eax,%eax
jg     1180 <main+0x50>
mov    $0x4,%esi
nopl   0x0(%rax)
cmpl   $0x1,(%rsp,%rsi,4)
je     11de <main+0xae>
cmpl   $0x1,0x4(%rsp,%rsi,4)
je     11e4 <main+0xb4>
cmpl   $0x1,0x8(%rsp,%rsi,4)
je     11ea <main+0xba>
cmpl   $0x1,0xc(%rsp,%rsi,4)
je     11f0 <main+0xc0>
cmpl   $0x1,0x10(%rsp,%rsi,4)
je     11f4 <main+0xc4>
add    $0x5,%rsi
cmp    $0x68,%rsi
jne    11b0 <main+0x80>
jmp    1200 <main+0xd0>
add    $0xfffffffffffffffc,%rsi
jmp    11f4 <main+0xc4>
add    $0xfffffffffffffffd,%rsi
jmp    11f4 <main+0xc4>
add    $0xfffffffffffffffe,%rsi
jmp    11f4 <main+0xc4>
add    $0xffffffffffffffff,%rsi
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a8,%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
%4 = alloca [100 x 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)
%7 = bitcast [100 x i32]* %4 to i8*
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
%11 = icmp sgt i32 %9, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
br label %8
19: ; preds = %8
store i32 0, i32* %5
br label %20
20: ; preds = %33, %19
%21 = load i32, i32* %5
%22 = icmp slt i32 %21, 100
br i1 %22, label %23, label %36
23: ; preds = %20
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %32
29: ; preds = %23
%30 = load i32, i32* %5
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %30)
br label %36
32: ; preds = %23
br label %33
33: ; preds = %32
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %20
36: ; preds = %29, %20
ret i32 0
}

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