import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random; import std.string, std.conv, std.stdio, std.typecons; const auto days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; void main() { auto n = readln.chomp.to!int; auto ci = readln.split.map!(to!int); auto sum = ci.sum; bool calc(int c) { return c * 10 <= sum; } writeln(ci.count!(calc) * 30); }