def main(): import sys input = sys.stdin.read().split() idx = 0 N = int(input[idx]) idx += 1 M = int(input[idx]) idx += 1 K = int(input[idx]) idx += 1 A = list(map(int, input[idx:idx+N])) if N > 0 else [] if N == 0: print(0) return max_A = max(A) if A else 0 if max_A == 0: print(0) return candidates = [] for k in range(1, K+1): total = max_A * k if total <= M: candidates.append(total) else: # Check if any element can be <= M possible = [a for a in A if a <= M] if not possible: candidates.append(0) continue max_possible = max(possible) total = max_possible * k if total <= M: candidates.append(total) else: candidates.append(M) max_candidate = max(candidates) if candidates else 0 print(max_candidate) if __name__ == "__main__": main()