n, m, k = map(int, input().split()) a = list(map(int, input().split())) if n > 0 else [] a.sort(reverse=True) max_sum = 0 for t in range(0, k + 1): current_sum = 0 rem = t for num in a: if rem == 0: break if num == 0: current_sum += 0 * rem rem = 0 break max_possible = (m - current_sum) // num cnt = min(rem, max_possible) current_sum += cnt * num rem -= cnt if current_sum <= m and current_sum > max_sum: max_sum = current_sum print(max_sum)