import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); int[] arr = new int[n]; int[] ans = new int[n]; StringBuilder sb = new StringBuilder(); sb.append(0); for (int i = 1; i < n; i++) { arr[i] = sc.nextInt() + arr[i - 1]; ans[i] = Math.max(arr[i], ans[i - 1] + d); sb.append(" ").append(ans[i]); } System.out.println(sb); } }