Const
n = 5;
var
arr: array [1..n] of integer;
i, max: integer;
begin
for i := 1 to n do
begin
write('A[', i, '] = ');
readln(arr[i]);
end;
max := 1;
for i := 1 to n do
if (max < arr[i]) and (arr[i] mod 5 = 0) then
max := arr[i];
if max = 1 then
writeln('No')
else
writeln(max);
end.