#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 i, n, r, b;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) {
    do {
      scanf("%d", &a[i]);
    } while (a[i] % 2 == 0);
  }
  r = n - 1;
  if (n % 2 != 0) {
    printf("\n %d", a[n / 2]);
  } else {
    for (i = 0; i < n / 2; i++) {
      b = a[i] - a[r];
      printf("%d\n", b);
      r--;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c8 <main+0xa8>
jmp    117e <main+0x5e>
mov    -0x30(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6e(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     117e <main+0x5e>
jmp    11ba <main+0x9a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116d <main+0x4d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     120d <main+0xed>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdfd(%rip),%rdi
call   1030 <printf@plt>
jmp    1272 <main+0x152>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
cmp    %ecx,%eax
jge    126d <main+0x14d>
mov    -0x30(%rbp),%rcx
movslq -0x8(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x10(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xdb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1214 <main+0xf4>
jmp    1272 <main+0x152>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xecd(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%r15
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    119d <main+0x7d>
xor    %r13d,%r13d
lea    0xe98(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    (%r12,%r13,4),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
testb  $0x1,(%rbx)
je     1180 <main+0x60>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
cmp    %rax,%r13
jl     1170 <main+0x50>
test   $0x1,%al
jne    11ee <main+0xce>
cmp    $0x2,%eax
jl     120a <main+0xea>
mov    %eax,%r13d
add    $0xffffffffffffffff,%r13
xor    %ebx,%ebx
lea    0xe4f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%r12,%rbx,4),%esi
sub    (%r12,%r13,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
add    $0xffffffffffffffff,%r13
cmp    %rax,%rbx
jl     11c0 <main+0xa0>
jmp    120a <main+0xea>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
mov    (%r12,%rax,4),%esi
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%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 = [5 x i8] c"\0A %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 i8*
%7 = alloca i64
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %6
%12 = alloca i32, i64 %10
store i64 %10, i64* %7
store i32 0, i32* %2
br label %13
13: ; preds = %31, %0
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %34
17: ; preds = %13
br label %18
18: ; preds = %23, %17
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %12, i64 %20
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
br label %23
23: ; preds = %18
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %12, i64 %25
%27 = load i32, i32* %26
%28 = srem i32 %27, 2
%29 = icmp eq i32 %28, 0
br i1 %29, label %18, label %30
30: ; preds = %23
br label %31
31: ; preds = %30
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %13
34: ; preds = %13
%35 = load i32, i32* %3
%36 = sub nsw i32 %35, 1
store i32 %36, i32* %4
%37 = load i32, i32* %3
%38 = srem i32 %37, 2
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %47
40: ; preds = %34
%41 = load i32, i32* %3
%42 = sdiv i32 %41, 2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %12, i64 %43
%45 = load i32, i32* %44
%46 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %45)
br label %71
47: ; preds = %34
store i32 0, i32* %2
br label %48
48: ; preds = %67, %47
%49 = load i32, i32* %2
%50 = load i32, i32* %3
%51 = sdiv i32 %50, 2
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %70
53: ; preds = %48
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i32, i32* %12, i64 %55
%57 = load i32, i32* %56
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i32, i32* %12, i64 %59
%61 = load i32, i32* %60
%62 = sub nsw i32 %57, %61
store i32 %62, i32* %5
%63 = load i32, i32* %5
%64 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %4
%66 = add nsw i32 %65, -1
store i32 %66, i32* %4
br label %67
67: ; preds = %53
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
store i32 %69, i32* %2
br label %48
70: ; preds = %48
br label %71
71: ; preds = %70, %40
store i32 0, i32* %1
%72 = load i8*, i8** %6
%73 = load i32, i32* %1
ret i32 %73
}

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