#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, long long);
scalar_t__ scanf(char *, int *);
int main() {
  int n, i, ar[9999];
  long long T;
  while (scanf("%d", &n) != EOF) {
    T = 1;
    for (i = 0; i < n; i++) {
      scanf("%d", &ar[i]);
      if (ar[i] % 2 != 0)
        T *= ar[i];
    }
    printf("%lld\n", T);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     11f0 <main+0xd0>
movq   $0x1,-0x9c58(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d8 <main+0xb8>
movslq -0xc(%rbp),%rax
lea    -0x9c50(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe77(%rip),%rdi
call   1040 <scanf@plt>
movslq -0xc(%rbp),%rax
mov    -0x9c50(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11c5 <main+0xa5>
movslq -0xc(%rbp),%rax
movslq -0x9c50(%rbp,%rax,4),%rax
ff
imul   -0x9c58(%rbp),%rax
ff
mov    %rax,-0x9c58(%rbp)
jmp    11ca <main+0xaa>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1164 <main+0x44>
mov    -0x9c58(%rbp),%rsi
lea    0xe1d(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9c58,%rsp
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
jne    1162 <main+0x42>
xor    %eax,%eax
add    $0x9c58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe97(%rip),%r12
mov    $0x1,%ebp
lea    0xc(%rsp),%r15
jmp    11ac <main+0x8c>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%r13d
lea    0xe76(%rip),%rdi
mov    %r13,%rsi
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x2e41(%rip),%rcx
cmp    (%rcx),%rax
je     114e <main+0x2e>
cmpl   $0x0,0xc(%rsp)
jle    1180 <main+0x60>
mov    $0x1,%r13d
lea    0x10(%rsp),%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rbx),%eax
test   $0x1,%al
cmove  %ebp,%eax
cltq
imul   %rax,%r13
add    $0x1,%r14
movslq 0xc(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%r14
jl     11d0 <main+0xb0>
jmp    1186 <main+0x66>

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

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