        import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        //InputStreamReader input = new InputStreamReader(System.in);
        //BufferedReader buffer = new BufferedReader(input);
        // FileInputStream fstream = new FileInputStream("text.txt");
        // BufferedReader buffer = new BufferedReader(new InputStreamReader(fstream));
        Scanner scanner = new Scanner(System.in);
        Long d = scanner.nextLong();
          Long s = scanner.nextLong();
        Long ds, answer= 0L,garbage= 0L,tmpanswer;
        boolean day=false;
        for (int i=0;i<d;++i) {
            ds = scanner.nextLong();
            if(garbage>0)
                day=true;
            garbage+=ds;
            if(garbage>s) {
                answer+=(garbage/s);
                garbage=(garbage%s);

                day=false;
            }
            if (day)
            {
                garbage=0L;
                answer++;
                day=false;
            }

        }
        if(garbage>0) answer++;
        System.out.println(answer);
    }
}