import heapq from bisect import bisect_left N, M, K = map(int, input().split()) A = list(map(int, input().split())) Q = [] B = set() Q.append(0) B.add(0) for i in range(2*10**5): d = heapq.heappop(Q) for j in range(N): if d + A[j] not in B: B.add(d+A[j]) heapq.heappush(Q, d+A[j]) C = sorted(list(B)) d = bisect_left(C, M) print(C[d])