const n=5;
type t_mass= array [1..n] of integer;
procedure kol(a:t_mass; var k:integer);
var i:integer;
begin
i:=1;
while (i<n) and (a[i]=a[i+1]) do inc(i);
k:=i;
end;
var i:integer;
a:t_mass;
Begin
for i:= 1 to n do
read(a[i]);
kol(a,i);
write(i);
end.
type t_mass= array [1..n] of integer;
procedure kol(a:t_mass; var k:integer);
var i:integer;
begin
i:=1;
while (i<n) and (a[i]=a[i+1]) do inc(i);
k:=i;
end;
var i:integer;
a:t_mass;
Begin
for i:= 1 to n do
read(a[i]);
kol(a,i);
write(i);
end.