#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 argc, char *noargs[]) {
  int I, N, V, S = 0, C = 0, T = 0;
  scanf("%d", &N);
  for (I = 0; I < N; ++I) {
    scanf("%d", &V);
    if (V == S)
      C += 1;
    else {
      T = T >= C ? T : C;
      C = 1;
      S = V;
    }
  }
  T = T >= C ? T : C;
  printf("%d\n", T);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
lea    0xeae(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11db <main+0xbb>
lea    0xe8b(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1198 <main+0x78>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c8 <main+0xa8>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     11af <main+0x8f>
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    11b5 <main+0x95>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11cd <main+0xad>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x42>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     11f2 <main+0xd2>
mov    -0x28(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    11f8 <main+0xd8>
mov    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1197 <main+0x77>
xor    %r13d,%r13d
lea    0x4(%rsp),%r15
mov    $0x1,%r12d
xor    %ebx,%ebx
xor    %r14d,%r14d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xe99(%rip),%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
lea    0x1(%rbx),%eax
cmp    %ebx,%r13d
cmovge %r13d,%ebx
cmp    %r14d,%ecx
cmovne %r12d,%eax
cmovne %ebx,%r13d
add    $0x1,%ebp
mov    %eax,%ebx
mov    %ecx,%r14d
cmp    (%rsp),%ebp
jl     1160 <main+0x40>
jmp    119c <main+0x7c>
xor    %eax,%eax
xor    %r13d,%r13d
cmp    %eax,%r13d
cmovl  %eax,%r13d
lea    0xe59(%rip),%rdi
mov    %r13d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%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 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
store i32 0, i32* %6
br label %13
13: ; preds = %37, %2
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %40
17: ; preds = %13
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%19 = load i32, i32* %8
%20 = load i32, i32* %9
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i32, i32* %10
%24 = add nsw i32 %23, 1
store i32 %24, i32* %10
br label %36
25: ; preds = %17
%26 = load i32, i32* %11
%27 = load i32, i32* %10
%28 = icmp sge i32 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = load i32, i32* %11
br label %33
31: ; preds = %25
%32 = load i32, i32* %10
br label %33
33: ; preds = %31, %29
%34 = phi i32 [ %30, %29 ], [ %32, %31 ]
store i32 %34, i32* %11
store i32 1, i32* %10
%35 = load i32, i32* %8
store i32 %35, i32* %9
br label %36
36: ; preds = %33, %22
br label %37
37: ; preds = %36
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %13
40: ; preds = %13
%41 = load i32, i32* %11
%42 = load i32, i32* %10
%43 = icmp sge i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = load i32, i32* %11
br label %48
46: ; preds = %40
%47 = load i32, i32* %10
br label %48
48: ; preds = %46, %44
%49 = phi i32 [ %45, %44 ], [ %47, %46 ]
store i32 %49, i32* %11
%50 = load i32, i32* %11
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %50)
ret i32 0
}

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