var
a: array[1..5] of Integer;
i, sum: Integer;
begin
sum := 0;
for i := 1 to 5 do
Read(a[i]);
if (a[i] mod 4 = 0) and (a[i] mod 10 = 6) then
sum := sum + a[i];
WriteLn(sum)
end.
var
a: array[1..5] of Integer;
i, sum: Integer;
begin
sum := 0;
for i := 1 to 5 do
Read(a[i]);
for i := 1 to 5 do
if (a[i] mod 4 = 0) and (a[i] mod 10 = 6) then
sum := sum + a[i];
WriteLn(sum)
end.