import java.util.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int k=s.nextInt();
        long sum=0;
        long ct=sum/k;
        long os=0;
        for(int i=0;i<n;i++)
        {
            sum=sum+s.nextLong();
        }
        //System.out.println(ct);
        ct=ct+sum/k;
        if(ct*k<sum)
          ct++;
        System.out.println(ct);
    
    }
}