Program t1; Var A: array [1..1000] of integer; N, i: Byte; s: Longint; Begin Readln (N); For i:= 1 to N do Begin Readln (A); If A mod 5 = 0 then s:=s+A; End; Write (s); Readln; End.