#include<bits/stdc++.h>
using namespace std;
int is_possible(int n,int k,int t,int mid,int arr[])
{
int painter=1;
int current_time=0;
for(int i=0;i<n;i++)
{
current_time+=arr[i]*t;
if(current_time>mid)
{
painter++;
current_time=arr[i]*t;
}
}
return painter;
}
int time_req(int n,int k,int t,int arr[])
{
int total_time=0;
for(int i=0;i<n;i++)
{
total_time=total_time+arr[i]*t;
}
int start=arr[n-1];
int ans=INT_MAX;
int end=total_time;
while(start<=end)
{
int mid=(start+end)/2;
int p=is_possible(n,k,t,mid,arr);
if(p>k)
{
start=mid+1;
}
else
{
ans=min(ans,mid);
end=mid-1;
}
}
return ans;
}
int main()
{
int n,k,t;
cin>>n>>k>>t;
int arr[n]={0};
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
cout<<time_req(n,k,t,arr);
}