k = int(input())
max_lope = []
a = 0
for i in range(k):
    a = int(input())
    max_lope.append(a)
    
max_lope.sort()

max_weight = 0
for i in range(k):
    m = max_lope[i] * (k - i)
    if(m > max_weight):
        max_weight = m

print(max_weight)

+ Recent posts