n = int(input()) c = list(map(int, input().split())) print(sum([30 for x in c if x <= sum(c)*0.1]))