N,M,K = map(int,input().split()) A = list(map(int,input().split())) + [0] S = set(A) for i in range(K-1): S2 = set() for a in A: for b in S: d = a + b if d <= M: S2.add(d) S = S2 S = list(S) S.sort() #print(S) from bisect import * print(S[bisect_right(S,M) - 1])