def solve(): from heapq import heapify, heappop, heappush N,K,X=map(int,input().split()) A=list(map(int,input().split())) inf=float("inf") T=[[inf, inf] for _ in range(N+1)] T[0][0]=0 Q=[(0,0,0)] while Q: cost,day,mode=heappop(Q) if day==N: return cost if mode==0: if cost+X