def main(): N = int(input()) C = list(map(int, input().split())) print( 30 * len(list(filter(lambda hyo: (sum(C) / hyo) >= 10, C))) ) if __name__ == "__main__": main()