import java.util.*; import java.lang.*; import java.io.*; public class Main { public static void main (String[] args) throws java.lang.Exception { // your code goes here // 入力 Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int D = sc.nextInt(); int[] pos = new int[N]; pos[0] = 0; for(int i = 1; i < N; i++){ int dist = sc.nextInt(); pos[i] = pos[i-1] + dist; } // 再整列 for(int i = 1; i < N; i++){ if(pos[i] - pos[i-1] < D){ pos[i] = pos[i-1] + D; } } // 出力 System.out.print(pos[0]); for(int i = 1; i < N; i++){ System.out.print(" " + pos[i]); } System.out.println(""); } }