N,M,K = map(int,input().split()) A = list(map(int,input().split())) + [0] #N,M,K = 100,1000000000,6 #from random import randint #A = [randint(1,1000000000) for _ in range(N)] S = [0] for i in range(K): S2 = set() for a in A: for b in S: d = a + b if d <= M: S2.add(d) S = S2 #print(i,len(S)) ans = 0 for s in S: if s <= M: ans = max(ans,s) print(ans)