from time import time time0=time() from random import randint,random e=2.718281828 N,M,K=map(int,input().split()) A=list(map(int,input().split())) A.append(0) ANS=[0]*K score=0 MAX=0 last=2 while time()-time00 and score+plus<=M: ANS[x]=A[y] score+=plus MAX=max(MAX,score) elif plus!=0 and score+plus<=M: mu=e**(plus/(time()-time0)/(M-MAX)) #print(plus,mu) if mu>random(): ANS[x]=A[y] score+=plus MAX=max(MAX,score) #print(plus,score,MAX,mu) #print(ANS,score) print(MAX)