Ответ:
n = int(input())
s = 0
for i in range(n):
a = int(input())
if a % 4 == 0 and a < 60:
s += a
print(s)