// PascalABC.NET
begin
var m := ReadInteger;
ReadSeqInteger(n).Where(p -> p mod 5 = 0).Min.Print
end.
// PascalABC.NET
begin
var m := ReadInteger;
ReadSeqInteger(n).Where(p -> p mod 5 = 0).Min.Print
end.