import java.util.Scanner; public class HelloWorld { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); int[] ai = new int[n]; ai[0] = 0; for (int i = 1;i < n; i ++) { ai[i] = sc.nextInt(); if (ai[i] < ai[i - 1] + d) { ai[i] = ai[i - 1] + d; }else { ai[i] += ai[i - 1]; } } sc.close(); for (int i = 0; i < n; i ++) { System.out.print(ai[i]); if (i == n - 1) { break; } System.out.print(" "); } } }