import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        int c = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        for (int i = 0; i < n - 1; ++i)
            a[i] = sc.nextInt();
        for (int i = 0; i < n - 1; ++i)
            b[i] = sc.nextInt();
        int[][] dp = new int[n + 1][2];
        dp[0][0] = 0;
        dp[0][1] = c;
        for (int i = 1; i < n; ++i) {
            dp[i][0] = Math.min(dp[i - 1][0] + a[i - 1], dp[i - 1][1] + b[i - 1]);
            dp[i][1] = Math.min(dp[i - 1][0] + a[i - 1] + c, dp[i - 1][1] + b[i - 1]);
        }
        for (int i = 0; i < n; ++i)
            out.print(Math.min(dp[i][0], dp[i][1]) + " ");

        out.close();
        out.flush();
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader f) {
            br = new BufferedReader(f);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

    }
}


import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import java.lang.Math.*;

public class by_elevator_or_stairs {

	public static void main(String[] args) throws Exception {
		new by_elevator_or_stairs().run();
	}

	public void run() throws Exception {
		FastIO file = new FastIO();
		int n = file.nextInt();
		int c = file.nextInt();
		int[] a = new int[n - 1];
		int[] b = new int[n - 1];
		for (int i = 0; i < n - 1; i++) a[i] = file.nextInt();
		for (int i = 0; i < n - 1; i++) b[i] = file.nextInt();
		int[][] dp = new int[n][2];
		for (int i = 1; i < n; i++) {
			dp[i][0] = Math.min(dp[i - 1][0], dp[i - 1][1]) + a[i - 1];
			dp[i][1] = Math.min(i == 1 ? Integer.MAX_VALUE : dp[i - 1][1] + b[i - 1], dp[i - 1][0] + c + b[i - 1]);
		}
		for (int i = 0; i < n; i++) {
			System.out.print(Math.min(dp[i][0], dp[i][1]) + " ");
		}
		file.out.flush();
	}

	public static class FastIO {
		BufferedReader br;
		StringTokenizer st;
		PrintWriter out;

		public FastIO() {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		void print(Object o) {
			out.print(o);
		}

		void println(Object o) {
			out.println(o);
		}

		void printf(String s, Object... o) {
			out.printf(s, o);
		}
	}

	public static long pow(long n, long p, long mod) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n % mod;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2, mod);
			return (temp * temp) % mod;
		} else {
			long temp = pow(n, (p - 1) / 2, mod);
			temp = (temp * temp) % mod;
			return (temp * n) % mod;

		}
	}

	public static long pow(long n, long p) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2);
			return (temp * temp);
		} else {
			long temp = pow(n, (p - 1) / 2);
			temp = (temp * temp);
			return (temp * n);

		}
	}

	public static long gcd(long x, long y) {
		if (x == 0)
			return y;
		else
			return gcd(y % x, x);
	}

	public static boolean isPrime(int n) {
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}
}


import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import java.lang.Math.*;

public class by_elevator_or_stairs {

	public static void main(String[] args) throws Exception {
		new by_elevator_or_stairs().run();
	}

	public void run() throws Exception {
		FastIO file = new FastIO();
		int n = file.nextInt();
		int c = file.nextInt();
		int[] a = new int[n - 1];
		int[] b = new int[n - 1];
		for (int i = 0; i < n - 1; i++) a[i] = file.nextInt();
		for (int i = 0; i < n - 1; i++) b[i] = file.nextInt();
		int[][] dp = new int[n][2];
		for (int i = 1; i < n; i++) {
			dp[i][0] = Math.min(dp[i - 1][0], dp[i - 1][1]) + a[i - 1];
			dp[i][1] = Math.min(dp[i - 1][1] + b[i - 1], dp[i - 1][0] + c + b[i - 1]);
		}
		for (int i = 0; i < n; i++) {
			if (i == 0) System.out.print(0 + " ");
			else System.out.print(1 + Math.min(dp[i][0], dp[i][1]) + " ");
		}
		file.out.flush();
	}

	public static class FastIO {
		BufferedReader br;
		StringTokenizer st;
		PrintWriter out;

		public FastIO() {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		void print(Object o) {
			out.print(o);
		}

		void println(Object o) {
			out.println(o);
		}

		void printf(String s, Object... o) {
			out.printf(s, o);
		}
	}

	public static long pow(long n, long p, long mod) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n % mod;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2, mod);
			return (temp * temp) % mod;
		} else {
			long temp = pow(n, (p - 1) / 2, mod);
			temp = (temp * temp) % mod;
			return (temp * n) % mod;

		}
	}

	public static long pow(long n, long p) {
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		if (p % 2 == 0) {
			long temp = pow(n, p / 2);
			return (temp * temp);
		} else {
			long temp = pow(n, (p - 1) / 2);
			temp = (temp * temp);
			return (temp * n);

		}
	}

	public static long gcd(long x, long y) {
		if (x == 0)
			return y;
		else
			return gcd(y % x, x);
	}

	public static boolean isPrime(int n) {
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;

		if (n % 2 == 0 || n % 3 == 0)
			return false;

		for (int i = 5; i * i <= n; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	static  ArrayList<Pair>adj[];
	static int memo2[];
	static char c1[][];
	static HashMap<Long,Integer> hs=new HashMap<>();

	public static void main(String[] args) throws Exception {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
			 n=sc.nextInt()-1;
			 c=sc.nextInt();
			 a=new int[n];
		 b=new int[n];
		for (int i = 0; i < b.length; i++) {
				a[i]=sc.nextInt();
		}
			for (int i = 0; i < b.length; i++) {
				b[i]=sc.nextInt();
			}
			int cost=0;
			int j=0;
			System.out.println(cost);
			boolean f=false;
			for (int i = 0; i < b.length; i++) {
				if(a[i]<b[i]) {
					cost+=a[i];
					f=false;
				}
				else if(b[i]+c<=a[i]&&!f) {
					f=true;
					cost+=b[i]+c;
				}
				else if(b[i]<=a[i]&&f) {
					cost+=b[i];

				}
				else if(b[i]+c>a[i]) {
					if(i+1<n) {
						if(a[i]+a[i+1]>b[i]+b[i+1]+c) {
							if(!f)
							cost+=b[i]+c;
							else
								cost+=b[i];

							f=true;

						}
						else {
							cost+=a[i];
							f=false;
						}

					}
					else {
						cost+=a[i];
					}
				}
				System.out.println(cost);

		}

	}
	static int memo12[][];
	static int b[];

	static class Pair implements Comparable<Pair>{
		int idx;
		int count;
		public Pair(int x , int y) {
		idx=x;
		count=y;
		}
		@Override
		public int compareTo(Pair o) {
			if(o.count==this.count) {
				return this.idx-o.idx;
			}
			return this.count-o.count;
		}

	}
	static long bs(long x) {
		long high=(long) 1e7;
		long low=0;
		long idxend=0;
		long idxstart=0;
		if(hs.containsKey(x)) {
			return hs.get(x);
		}
		while(high>=low) {
			long mid=(high+low)>>1;
			long range=((mid)*(mid-1));
			range/=2;
			range++;
			if(range>x) {
				high=mid-1;

			}
			else {
				low=mid+1;
			idxstart=mid;
			}
		}
	return idxstart;
	}
	static boolean vis2[][];
	static boolean dp(int i ,int idx) {
		if(idx==n&&i==1) {
			return true;
		}
		else if(idx==n) {
			return false;
		}
		if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==1) {
			return dp(0,idx+1);
		}
		else if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==0) {
			return dp(i+1,idx+1);
		}
		else {
			if(i==0)
			return dp(i+1,idx+1);
			else {
				return dp(0,idx+1);
			}
		}

	}
	static class SegmentTree {		// 1-based DS, OOP

		int N; 			//the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in)
		{
			array = in; N = in.length - 1;
			sTree = new int[N<<1];		//no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N<<1];
			build(1,1,N);
		}

		void build(int node, int b, int e)	// O(n)
		{
			if(b == e)
				sTree[node] = array[b];
			else
			{
				int mid = b + e >> 1;
				build(node<<1,b,mid);
				build(node<<1|1,mid+1,e);
				sTree[node] = sTree[node<<1]+sTree[node<<1|1];
			}
		}

		void update_point(int index, int val)			// O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while(index>1)
			{
				index >>= 1;
				sTree[index] = sTree[index<<1] + sTree[index<<1|1];
			}
		}

		void update_range(int i, int j, int val)		// O(log n)
		{
			update_range(1,1,N,i,j,val);
		}

		void update_range(int node, int b, int e, int i, int j, int val)
		{
			if(i > e || j < b)
				return;
			if(b >= i && e <= j)
			{
				sTree[node] += (e-b+1)*val;
				lazy[node] += val;
			}
			else
			{
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node<<1,b,mid,i,j,val);
				update_range(node<<1|1,mid+1,e,i,j,val);
				sTree[node] = sTree[node<<1] + sTree[node<<1|1];
			}

		}
		void propagate(int node, int b, int mid, int e)
		{
			lazy[node<<1] += lazy[node];
			lazy[node<<1|1] += lazy[node];
			sTree[node<<1] += (mid-b+1)*lazy[node];
			sTree[node<<1|1] += (e-mid)*lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j)
		{
			return query(1,1,N,i,j);
		}

		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;
			if(b>= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;

		}

	}
	static long mod=(long) (1e9+7);
	static boolean f2=false;
	static long[][] matMul(long[][] a2, long[][] b, int p, int q, int r)	//C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		long[][] C = new long[p][r];
		for(int i = 0; i < p; ++i) {
			for(int j = 0; j < r; ++j) {
				for(int k = 0; k < q; ++k) {
					C[i][j] = (C[i][j]+(a2[i][k]%mod * b[k][j]%mod))%mod;
		 C[i][j]%=mod;
				}

			}
		}
		return C;
	}
		static long query[];
	static long last1=0;
	static TreeSet<Long> x1;
	static HashMap<Long,Long> map;
	static long max=0;
	static int first=0;

	static ArrayList<Pair> a1[];
	static int memo1[];

	static boolean vis[];
	static TreeSet<Integer> set=new TreeSet<Integer>();

	static long modPow(long ways, long count, long mod)	// O(log e)
	{
		ways %= mod;
		long res = 1;
		while(count > 0)
		{
			if((count & 1) == 1)
				res = (res * ways) % mod;
			ways = (ways * ways) % mod;
			count >>= 1;
		}
		return res%mod;
	}

	static  int  dx[] = {0,0,0,3,3,3,6,6,6};
	static int dy[] = {0,3,6,0,3,6,0,3,6};
	static int memo[][];
	static int a[];
	static int n;
	static int s;
	static boolean f[];

	static long gcd(long ans,long b) {
		if(b==0) {
			return ans;
		}
		return gcd(b,ans%b);
	}
	static int[] isComposite;
	static int[] valid;

	static ArrayList<Integer> primes;
	static ArrayList<Integer> l;
	static void sieve(int N)	// O(N log log N)
	{
		isComposite = new int[N+1];
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();
		l=new ArrayList<>();
		valid=new int[N+1];
		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				l.add(i);
				valid[i]=1;

				for (int j = i*2; j <=N; j +=i) {	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;

					}
			}

		for(int i=0 ; i<primes.size() ; i++) {
			for(int j:primes) {
				if(primes.get(i)*j>N) {
					break;
				}
				valid[primes.get(i)*j]=1;
			}
		}
	}
	static int c;
	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N)
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j)
		{
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++;
			}
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	public static int[] schuffle(int[] a2) {
		for (int i = 0; i < a2.length; i++) {
			int x=(int)(Math.random()*a2.length);
		int temp=a2[x];
		a2[x]=a2[i];
		a2[i]=temp;
		}
		return a2;
	}
		static int V;
	static int INF=(int) 1E9;

		static class Edge2
		{
			int node;
		long cost;
			long next;
			Edge2(int a, int c,Long long1) { node = a;	cost = long1; next=c;}

		}
static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	static  ArrayList<Pair>adj[];
	static int memo2[];
	static char c1[][];
	static HashMap<Long,Integer> hs=new HashMap<>();

	public static void main(String[] args) throws Exception {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
			 n=sc.nextInt()-1;
			 c=sc.nextInt();
			 a=new int[n];
		 b=new int[n];
		for (int i = 0; i < b.length; i++) {
				a[i]=sc.nextInt();
			}
			for (int i = 0; i < b.length; i++) {
				b[i]=sc.nextInt();
			}
			memo=new int[n][2];
			for (int i = 0; i < memo.length; i++) {
				for (int k = 0; k < memo[i].length; k++) {
					memo[i][k]=-1;
				}
			}
			for (int i = 0; i <=b.length; i++) {
			System.out.println(dp1(i-1,0));
			}

	}
	static int memo[][];
	static int b[];
	static int dp1(int i ,int state) {
		if(i==-1) {
			return 0;
		}
		if(memo[i][state]!=-1) {
			return memo[i][state];
		}
		int min=(int) 1e9;

		if(state==1) {
			min=Math.min(dp1(i-1,1)+b[i], dp1(i-1,0)+a[i]);
		}
		else {
			min=Math.min(dp1(i-1,1)+b[i]+c, dp1(i-1,0)+a[i]);
		}
		return memo[i][state]=min;

	}
	static class Pair implements Comparable<Pair>{
		int idx;
		int count;
		public Pair(int x , int y) {
		idx=x;
		count=y;
		}
		@Override
		public int compareTo(Pair o) {
			if(o.count==this.count) {
				return this.idx-o.idx;
			}
			return this.count-o.count;
		}

	}
	static long bs(long x) {
		long high=(long) 1e7;
		long low=0;
		long idxend=0;
		long idxstart=0;
		if(hs.containsKey(x)) {
			return hs.get(x);
		}
		while(high>=low) {
			long mid=(high+low)>>1;
			long range=((mid)*(mid-1));
			range/=2;
			range++;
			if(range>x) {
				high=mid-1;

			}
			else {
				low=mid+1;
			idxstart=mid;
			}
		}
	return idxstart;
	}
	static boolean vis2[][];

	static class SegmentTree {		// 1-based DS, OOP

		int N; 			//the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in)
		{
			array = in; N = in.length - 1;
			sTree = new int[N<<1];		//no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N<<1];
			build(1,1,N);
		}

		void build(int node, int b, int e)	// O(n)
		{
			if(b == e)
				sTree[node] = array[b];
			else
			{
				int mid = b + e >> 1;
				build(node<<1,b,mid);
				build(node<<1|1,mid+1,e);
				sTree[node] = sTree[node<<1]+sTree[node<<1|1];
			}
		}

		void update_point(int index, int val)			// O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while(index>1)
			{
				index >>= 1;
				sTree[index] = sTree[index<<1] + sTree[index<<1|1];
			}
		}

		void update_range(int i, int j, int val)		// O(log n)
		{
			update_range(1,1,N,i,j,val);
		}

		void update_range(int node, int b, int e, int i, int j, int val)
		{
			if(i > e || j < b)
				return;
			if(b >= i && e <= j)
			{
				sTree[node] += (e-b+1)*val;
				lazy[node] += val;
			}
			else
			{
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node<<1,b,mid,i,j,val);
				update_range(node<<1|1,mid+1,e,i,j,val);
				sTree[node] = sTree[node<<1] + sTree[node<<1|1];
			}

		}
		void propagate(int node, int b, int mid, int e)
		{
			lazy[node<<1] += lazy[node];
			lazy[node<<1|1] += lazy[node];
			sTree[node<<1] += (mid-b+1)*lazy[node];
			sTree[node<<1|1] += (e-mid)*lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j)
		{
			return query(1,1,N,i,j);
		}

		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;
			if(b>= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;

		}

	}
	static long mod=(long) (1e9+7);
	static boolean f2=false;
	static long[][] matMul(long[][] a2, long[][] b, int p, int q, int r)	//C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		long[][] C = new long[p][r];
		for(int i = 0; i < p; ++i) {
			for(int j = 0; j < r; ++j) {
				for(int k = 0; k < q; ++k) {
					C[i][j] = (C[i][j]+(a2[i][k]%mod * b[k][j]%mod))%mod;
		 C[i][j]%=mod;
				}

			}
		}
		return C;
	}
		static long query[];
	static long last1=0;
	static TreeSet<Long> x1;
	static HashMap<Long,Long> map;
	static long max=0;
	static int first=0;

	static ArrayList<Pair> a1[];
	static int memo1[];

	static boolean vis[];
	static TreeSet<Integer> set=new TreeSet<Integer>();

	static long modPow(long ways, long count, long mod)	// O(log e)
	{
		ways %= mod;
		long res = 1;
		while(count > 0)
		{
			if((count & 1) == 1)
				res = (res * ways) % mod;
			ways = (ways * ways) % mod;
			count >>= 1;
		}
		return res%mod;
	}

	static  int  dx[] = {0,0,0,3,3,3,6,6,6};
	static int dy[] = {0,3,6,0,3,6,0,3,6};
	static int a[];
	static int n;
	static int s;
	static boolean f[];

	static long gcd(long ans,long b) {
		if(b==0) {
			return ans;
		}
		return gcd(b,ans%b);
	}
	static int[] isComposite;
	static int[] valid;

	static ArrayList<Integer> primes;
	static ArrayList<Integer> l;
	static void sieve(int N)	// O(N log log N)
	{
		isComposite = new int[N+1];
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();
		l=new ArrayList<>();
		valid=new int[N+1];
		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				l.add(i);
				valid[i]=1;

				for (int j = i*2; j <=N; j +=i) {	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;

					}
			}

		for(int i=0 ; i<primes.size() ; i++) {
			for(int j:primes) {
				if(primes.get(i)*j>N) {
					break;
				}
				valid[primes.get(i)*j]=1;
			}
		}
	}
	static int c;
	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N)
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j)
		{
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++;
			}
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	public static int[] schuffle(int[] a2) {
		for (int i = 0; i < a2.length; i++) {
			int x=(int)(Math.random()*a2.length);
		int temp=a2[x];
		a2[x]=a2[i];
		a2[i]=temp;
		}
		return a2;
	}
		static int V;
	static int INF=(int) 1E9;

		static class Edge2
		{
			int node;
		long cost;
			long next;
			Edge2(int a, int c,Long long1) { node = a;	cost = long1; next=c;}

		}
static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	static  ArrayList<Pair>adj[];
	static int memo2[];
	static char c1[][];
	static HashMap<Long,Integer> hs=new HashMap<>();

	public static void main(String[] args) throws Exception {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
			 n=sc.nextInt()-1;
			 c=sc.nextInt();
			 a=new int[n];
		 b=new int[n];
		for (int i = 0; i < b.length; i++) {
				a[i]=sc.nextInt();
		}
			for (int i = 0; i < b.length; i++) {
				b[i]=sc.nextInt();
			}
			long cost=0;
			int j=0;
			System.out.println(cost);
			boolean f=false;
			for (int i = 0; i < b.length; i++) {
				if(a[i]<b[i]) {
					cost+=a[i];
					f=false;
				}
				else if(b[i]+c<=a[i]&&!f) {
					f=true;
					cost+=b[i]+c;
				}
				else if(b[i]<=a[i]&&f) {
					cost+=b[i];

				}
				else if(b[i]+c>a[i]) {
					if(i+1<n) {
						if(a[i]+a[i+1]>b[i]+b[i+1]+c) {
							if(!f)
							cost+=b[i]+c;
							else
								cost+=b[i];

							f=true;

						}
						else {
							cost+=a[i];
							f=false;
						}

					}
					else {
						f=false;
						cost+=a[i];
					}
				}
				System.out.println(cost);

		}

	}
	static int memo12[][];
	static int b[];

	static class Pair implements Comparable<Pair>{
		int idx;
		int count;
		public Pair(int x , int y) {
		idx=x;
		count=y;
		}
		@Override
		public int compareTo(Pair o) {
			if(o.count==this.count) {
				return this.idx-o.idx;
			}
			return this.count-o.count;
		}

	}
	static long bs(long x) {
		long high=(long) 1e7;
		long low=0;
		long idxend=0;
		long idxstart=0;
		if(hs.containsKey(x)) {
			return hs.get(x);
		}
		while(high>=low) {
			long mid=(high+low)>>1;
			long range=((mid)*(mid-1));
			range/=2;
			range++;
			if(range>x) {
				high=mid-1;

			}
			else {
				low=mid+1;
			idxstart=mid;
			}
		}
	return idxstart;
	}
	static boolean vis2[][];
	static boolean dp(int i ,int idx) {
		if(idx==n&&i==1) {
			return true;
		}
		else if(idx==n) {
			return false;
		}
		if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==1) {
			return dp(0,idx+1);
		}
		else if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==0) {
			return dp(i+1,idx+1);
		}
		else {
			if(i==0)
			return dp(i+1,idx+1);
			else {
				return dp(0,idx+1);
			}
		}

	}
	static class SegmentTree {		// 1-based DS, OOP

		int N; 			//the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in)
		{
			array = in; N = in.length - 1;
			sTree = new int[N<<1];		//no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N<<1];
			build(1,1,N);
		}

		void build(int node, int b, int e)	// O(n)
		{
			if(b == e)
				sTree[node] = array[b];
			else
			{
				int mid = b + e >> 1;
				build(node<<1,b,mid);
				build(node<<1|1,mid+1,e);
				sTree[node] = sTree[node<<1]+sTree[node<<1|1];
			}
		}

		void update_point(int index, int val)			// O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while(index>1)
			{
				index >>= 1;
				sTree[index] = sTree[index<<1] + sTree[index<<1|1];
			}
		}

		void update_range(int i, int j, int val)		// O(log n)
		{
			update_range(1,1,N,i,j,val);
		}

		void update_range(int node, int b, int e, int i, int j, int val)
		{
			if(i > e || j < b)
				return;
			if(b >= i && e <= j)
			{
				sTree[node] += (e-b+1)*val;
				lazy[node] += val;
			}
			else
			{
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node<<1,b,mid,i,j,val);
				update_range(node<<1|1,mid+1,e,i,j,val);
				sTree[node] = sTree[node<<1] + sTree[node<<1|1];
			}

		}
		void propagate(int node, int b, int mid, int e)
		{
			lazy[node<<1] += lazy[node];
			lazy[node<<1|1] += lazy[node];
			sTree[node<<1] += (mid-b+1)*lazy[node];
			sTree[node<<1|1] += (e-mid)*lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j)
		{
			return query(1,1,N,i,j);
		}

		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;
			if(b>= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;

		}

	}
	static long mod=(long) (1e9+7);
	static boolean f2=false;
	static long[][] matMul(long[][] a2, long[][] b, int p, int q, int r)	//C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		long[][] C = new long[p][r];
		for(int i = 0; i < p; ++i) {
			for(int j = 0; j < r; ++j) {
				for(int k = 0; k < q; ++k) {
					C[i][j] = (C[i][j]+(a2[i][k]%mod * b[k][j]%mod))%mod;
		 C[i][j]%=mod;
				}

			}
		}
		return C;
	}
		static long query[];
	static long last1=0;
	static TreeSet<Long> x1;
	static HashMap<Long,Long> map;
	static long max=0;
	static int first=0;

	static ArrayList<Pair> a1[];
	static int memo1[];

	static boolean vis[];
	static TreeSet<Integer> set=new TreeSet<Integer>();

	static long modPow(long ways, long count, long mod)	// O(log e)
	{
		ways %= mod;
		long res = 1;
		while(count > 0)
		{
			if((count & 1) == 1)
				res = (res * ways) % mod;
			ways = (ways * ways) % mod;
			count >>= 1;
		}
		return res%mod;
	}

	static  int  dx[] = {0,0,0,3,3,3,6,6,6};
	static int dy[] = {0,3,6,0,3,6,0,3,6};
	static int memo[][];
	static int a[];
	static int n;
	static int s;
	static boolean f[];

	static long gcd(long ans,long b) {
		if(b==0) {
			return ans;
		}
		return gcd(b,ans%b);
	}
	static int[] isComposite;
	static int[] valid;

	static ArrayList<Integer> primes;
	static ArrayList<Integer> l;
	static void sieve(int N)	// O(N log log N)
	{
		isComposite = new int[N+1];
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();
		l=new ArrayList<>();
		valid=new int[N+1];
		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				l.add(i);
				valid[i]=1;

				for (int j = i*2; j <=N; j +=i) {	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;

					}
			}

		for(int i=0 ; i<primes.size() ; i++) {
			for(int j:primes) {
				if(primes.get(i)*j>N) {
					break;
				}
				valid[primes.get(i)*j]=1;
			}
		}
	}
	static int c;
	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N)
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j)
		{
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++;
			}
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	public static int[] schuffle(int[] a2) {
		for (int i = 0; i < a2.length; i++) {
			int x=(int)(Math.random()*a2.length);
		int temp=a2[x];
		a2[x]=a2[i];
		a2[i]=temp;
		}
		return a2;
	}
		static int V;
	static int INF=(int) 1E9;

		static class Edge2
		{
			int node;
		long cost;
			long next;
			Edge2(int a, int c,Long long1) { node = a;	cost = long1; next=c;}

		}
static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	static  ArrayList<Pair>adj[];
	static int memo2[];
	static char c1[][];
	static HashMap<Long,Integer> hs=new HashMap<>();

	public static void main(String[] args) throws Exception {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
			 n=sc.nextInt()-1;
			 c=sc.nextInt();
			 a=new int[n];
		 b=new int[n];
		for (int i = 0; i < b.length; i++) {
				a[i]=sc.nextInt();
		}
			for (int i = 0; i < b.length; i++) {
				b[i]=sc.nextInt();
			}
			int cost=0;
			int j=0;
			System.out.println(cost);
			boolean f=false;
			for (int i = 0; i < b.length; i++) {
				if(a[i]<b[i]) {
					cost+=a[i];
					f=false;
				}
				else if(b[i]+c<=a[i]&&!f) {
					f=true;
					cost+=b[i]+c;
				}
				else if(b[i]<=a[i]&&f) {
					cost+=b[i];

				}
				else if(b[i]+c>a[i]) {
					if(i+1<n) {
						if(a[i]+a[i+1]>b[i]+b[i+1]+c) {
							if(!f)
							cost+=b[i]+b[i+1]+c;
							else
								cost+=b[i]+b[i+1];

							i++;
							f=true;

						}
						else {
							cost+=a[i]+a[i+1];
							f=false;
							i++;
						}

					}
					else {
						cost+=a[i];
					}
				}
				System.out.println(cost);

		}

	}
	static int memo12[][];
	static int b[];

	static class Pair implements Comparable<Pair>{
		int idx;
		int count;
		public Pair(int x , int y) {
		idx=x;
		count=y;
		}
		@Override
		public int compareTo(Pair o) {
			if(o.count==this.count) {
				return this.idx-o.idx;
			}
			return this.count-o.count;
		}

	}
	static long bs(long x) {
		long high=(long) 1e7;
		long low=0;
		long idxend=0;
		long idxstart=0;
		if(hs.containsKey(x)) {
			return hs.get(x);
		}
		while(high>=low) {
			long mid=(high+low)>>1;
			long range=((mid)*(mid-1));
			range/=2;
			range++;
			if(range>x) {
				high=mid-1;

			}
			else {
				low=mid+1;
			idxstart=mid;
			}
		}
	return idxstart;
	}
	static boolean vis2[][];
	static boolean dp(int i ,int idx) {
		if(idx==n&&i==1) {
			return true;
		}
		else if(idx==n) {
			return false;
		}
		if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==1) {
			return dp(0,idx+1);
		}
		else if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==0) {
			return dp(i+1,idx+1);
		}
		else {
			if(i==0)
			return dp(i+1,idx+1);
			else {
				return dp(0,idx+1);
			}
		}

	}
	static class SegmentTree {		// 1-based DS, OOP

		int N; 			//the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in)
		{
			array = in; N = in.length - 1;
			sTree = new int[N<<1];		//no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N<<1];
			build(1,1,N);
		}

		void build(int node, int b, int e)	// O(n)
		{
			if(b == e)
				sTree[node] = array[b];
			else
			{
				int mid = b + e >> 1;
				build(node<<1,b,mid);
				build(node<<1|1,mid+1,e);
				sTree[node] = sTree[node<<1]+sTree[node<<1|1];
			}
		}

		void update_point(int index, int val)			// O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while(index>1)
			{
				index >>= 1;
				sTree[index] = sTree[index<<1] + sTree[index<<1|1];
			}
		}

		void update_range(int i, int j, int val)		// O(log n)
		{
			update_range(1,1,N,i,j,val);
		}

		void update_range(int node, int b, int e, int i, int j, int val)
		{
			if(i > e || j < b)
				return;
			if(b >= i && e <= j)
			{
				sTree[node] += (e-b+1)*val;
				lazy[node] += val;
			}
			else
			{
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node<<1,b,mid,i,j,val);
				update_range(node<<1|1,mid+1,e,i,j,val);
				sTree[node] = sTree[node<<1] + sTree[node<<1|1];
			}

		}
		void propagate(int node, int b, int mid, int e)
		{
			lazy[node<<1] += lazy[node];
			lazy[node<<1|1] += lazy[node];
			sTree[node<<1] += (mid-b+1)*lazy[node];
			sTree[node<<1|1] += (e-mid)*lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j)
		{
			return query(1,1,N,i,j);
		}

		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;
			if(b>= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;

		}

	}
	static long mod=(long) (1e9+7);
	static boolean f2=false;
	static long[][] matMul(long[][] a2, long[][] b, int p, int q, int r)	//C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		long[][] C = new long[p][r];
		for(int i = 0; i < p; ++i) {
			for(int j = 0; j < r; ++j) {
				for(int k = 0; k < q; ++k) {
					C[i][j] = (C[i][j]+(a2[i][k]%mod * b[k][j]%mod))%mod;
		 C[i][j]%=mod;
				}

			}
		}
		return C;
	}
		static long query[];
	static long last1=0;
	static TreeSet<Long> x1;
	static HashMap<Long,Long> map;
	static long max=0;
	static int first=0;

	static ArrayList<Pair> a1[];
	static int memo1[];

	static boolean vis[];
	static TreeSet<Integer> set=new TreeSet<Integer>();

	static long modPow(long ways, long count, long mod)	// O(log e)
	{
		ways %= mod;
		long res = 1;
		while(count > 0)
		{
			if((count & 1) == 1)
				res = (res * ways) % mod;
			ways = (ways * ways) % mod;
			count >>= 1;
		}
		return res%mod;
	}

	static  int  dx[] = {0,0,0,3,3,3,6,6,6};
	static int dy[] = {0,3,6,0,3,6,0,3,6};
	static int memo[][];
	static int a[];
	static int n;
	static int s;
	static boolean f[];

	static long gcd(long ans,long b) {
		if(b==0) {
			return ans;
		}
		return gcd(b,ans%b);
	}
	static int[] isComposite;
	static int[] valid;

	static ArrayList<Integer> primes;
	static ArrayList<Integer> l;
	static void sieve(int N)	// O(N log log N)
	{
		isComposite = new int[N+1];
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();
		l=new ArrayList<>();
		valid=new int[N+1];
		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				l.add(i);
				valid[i]=1;

				for (int j = i*2; j <=N; j +=i) {	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;

					}
			}

		for(int i=0 ; i<primes.size() ; i++) {
			for(int j:primes) {
				if(primes.get(i)*j>N) {
					break;
				}
				valid[primes.get(i)*j]=1;
			}
		}
	}
	static int c;
	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N)
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j)
		{
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++;
			}
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	public static int[] schuffle(int[] a2) {
		for (int i = 0; i < a2.length; i++) {
			int x=(int)(Math.random()*a2.length);
		int temp=a2[x];
		a2[x]=a2[i];
		a2[i]=temp;
		}
		return a2;
	}
		static int V;
	static int INF=(int) 1E9;

		static class Edge2
		{
			int node;
		long cost;
			long next;
			Edge2(int a, int c,Long long1) { node = a;	cost = long1; next=c;}

		}
static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	static  ArrayList<Pair>adj[];
	static int memo2[];
	static char c1[][];
	static HashMap<Long,Integer> hs=new HashMap<>();

	public static void main(String[] args) throws Exception {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
			 n=sc.nextInt()-1;
			 c=sc.nextInt();
			 a=new int[n];
		 b=new int[n];
		for (int i = 0; i < b.length; i++) {
				a[i]=sc.nextInt();
		}
			for (int i = 0; i < b.length; i++) {
				b[i]=sc.nextInt();
			}
			long cost=0;
			int j=0;
			System.out.println(cost);
			boolean f=false;
			for (int i = 0; i < b.length; i++) {
				if(a[i]<b[i]) {
					cost+=a[i];
					f=false;
				}
				else if(b[i]+c<=a[i]&&!f) {
					f=true;
					cost+=b[i]+c;
				}
				else if(b[i]<=a[i]&&f) {
					cost+=b[i];

				}
				else if(b[i]+c>a[i]) {
					if(i+1<n) {
						if(a[i]+a[i+1]>b[i]+b[i+1]+c) {
							if(!f)
							cost+=b[i]+c;
							else
								cost+=b[i];

							f=true;

						}
						else {
							cost+=a[i];
							f=false;
						}

					}
					else {
						cost+=a[i];
					}
				}
				System.out.println(cost);

		}

	}
	static int memo12[][];
	static int b[];

	static class Pair implements Comparable<Pair>{
		int idx;
		int count;
		public Pair(int x , int y) {
		idx=x;
		count=y;
		}
		@Override
		public int compareTo(Pair o) {
			if(o.count==this.count) {
				return this.idx-o.idx;
			}
			return this.count-o.count;
		}

	}
	static long bs(long x) {
		long high=(long) 1e7;
		long low=0;
		long idxend=0;
		long idxstart=0;
		if(hs.containsKey(x)) {
			return hs.get(x);
		}
		while(high>=low) {
			long mid=(high+low)>>1;
			long range=((mid)*(mid-1));
			range/=2;
			range++;
			if(range>x) {
				high=mid-1;

			}
			else {
				low=mid+1;
			idxstart=mid;
			}
		}
	return idxstart;
	}
	static boolean vis2[][];
	static boolean dp(int i ,int idx) {
		if(idx==n&&i==1) {
			return true;
		}
		else if(idx==n) {
			return false;
		}
		if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==1) {
			return dp(0,idx+1);
		}
		else if(c1[i][idx]=='1'||c1[i][idx]=='2'&&i==0) {
			return dp(i+1,idx+1);
		}
		else {
			if(i==0)
			return dp(i+1,idx+1);
			else {
				return dp(0,idx+1);
			}
		}

	}
	static class SegmentTree {		// 1-based DS, OOP

		int N; 			//the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in)
		{
			array = in; N = in.length - 1;
			sTree = new int[N<<1];		//no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N<<1];
			build(1,1,N);
		}

		void build(int node, int b, int e)	// O(n)
		{
			if(b == e)
				sTree[node] = array[b];
			else
			{
				int mid = b + e >> 1;
				build(node<<1,b,mid);
				build(node<<1|1,mid+1,e);
				sTree[node] = sTree[node<<1]+sTree[node<<1|1];
			}
		}

		void update_point(int index, int val)			// O(log n)
		{
			index += N - 1;
			sTree[index] += val;
			while(index>1)
			{
				index >>= 1;
				sTree[index] = sTree[index<<1] + sTree[index<<1|1];
			}
		}

		void update_range(int i, int j, int val)		// O(log n)
		{
			update_range(1,1,N,i,j,val);
		}

		void update_range(int node, int b, int e, int i, int j, int val)
		{
			if(i > e || j < b)
				return;
			if(b >= i && e <= j)
			{
				sTree[node] += (e-b+1)*val;
				lazy[node] += val;
			}
			else
			{
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node<<1,b,mid,i,j,val);
				update_range(node<<1|1,mid+1,e,i,j,val);
				sTree[node] = sTree[node<<1] + sTree[node<<1|1];
			}

		}
		void propagate(int node, int b, int mid, int e)
		{
			lazy[node<<1] += lazy[node];
			lazy[node<<1|1] += lazy[node];
			sTree[node<<1] += (mid-b+1)*lazy[node];
			sTree[node<<1|1] += (e-mid)*lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j)
		{
			return query(1,1,N,i,j);
		}

		int query(int node, int b, int e, int i, int j)	// O(log n)
		{
			if(i>e || j <b)
				return 0;
			if(b>= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node<<1,b,mid,i,j);
			int q2 = query(node<<1|1,mid+1,e,i,j);
			return q1 + q2;

		}

	}
	static long mod=(long) (1e9+7);
	static boolean f2=false;
	static long[][] matMul(long[][] a2, long[][] b, int p, int q, int r)	//C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		long[][] C = new long[p][r];
		for(int i = 0; i < p; ++i) {
			for(int j = 0; j < r; ++j) {
				for(int k = 0; k < q; ++k) {
					C[i][j] = (C[i][j]+(a2[i][k]%mod * b[k][j]%mod))%mod;
		 C[i][j]%=mod;
				}

			}
		}
		return C;
	}
		static long query[];
	static long last1=0;
	static TreeSet<Long> x1;
	static HashMap<Long,Long> map;
	static long max=0;
	static int first=0;

	static ArrayList<Pair> a1[];
	static int memo1[];

	static boolean vis[];
	static TreeSet<Integer> set=new TreeSet<Integer>();

	static long modPow(long ways, long count, long mod)	// O(log e)
	{
		ways %= mod;
		long res = 1;
		while(count > 0)
		{
			if((count & 1) == 1)
				res = (res * ways) % mod;
			ways = (ways * ways) % mod;
			count >>= 1;
		}
		return res%mod;
	}

	static  int  dx[] = {0,0,0,3,3,3,6,6,6};
	static int dy[] = {0,3,6,0,3,6,0,3,6};
	static int memo[][];
	static int a[];
	static int n;
	static int s;
	static boolean f[];

	static long gcd(long ans,long b) {
		if(b==0) {
			return ans;
		}
		return gcd(b,ans%b);
	}
	static int[] isComposite;
	static int[] valid;

	static ArrayList<Integer> primes;
	static ArrayList<Integer> l;
	static void sieve(int N)	// O(N log log N)
	{
		isComposite = new int[N+1];
		isComposite[0] = isComposite[1] = 1;			// 0 indicates a prime number
		primes = new ArrayList<Integer>();
		l=new ArrayList<>();
		valid=new int[N+1];
		for (int i = 2; i <= N; ++i) 					//can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) 					//can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				l.add(i);
				valid[i]=1;

				for (int j = i*2; j <=N; j +=i) {	// j = i * 2 will not affect performance too much, may alter in modified sieve
						isComposite[j] = 1;

					}
			}

		for(int i=0 ; i<primes.size() ; i++) {
			for(int j:primes) {
				if(primes.get(i)*j>N) {
					break;
				}
				valid[primes.get(i)*j]=1;
			}
		}
	}
	static int c;
	static class UnionFind {
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N)
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j)
		{
			if (isSameSet(i, j))
				return;
			numSets--;
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++;
			}
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	public static int[] schuffle(int[] a2) {
		for (int i = 0; i < a2.length; i++) {
			int x=(int)(Math.random()*a2.length);
		int temp=a2[x];
		a2[x]=a2[i];
		a2[i]=temp;
		}
		return a2;
	}
		static int V;
	static int INF=(int) 1E9;

		static class Edge2
		{
			int node;
		long cost;
			long next;
			Edge2(int a, int c,Long long1) { node = a;	cost = long1; next=c;}

		}
static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.util.*;
import java.io.*;

public class HelloWorld
{
    public static void main(String args[]) throws Exception
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int c = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        int[] a = new int[n];
        for(int i = 1; i < n; i++) a[i] = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        int[] b = new int[n];
        for(int i = 1; i < n; i++) b[i] = Integer.parseInt(st.nextToken());
        int[][] dp = new int[n+1][2];
        dp[1][0] = 0;
        dp[1][1] = c;
        for(int i = 2; i <= n; i++)
        {
          dp[i][0] = dp[i-1][0]+a[i-1];
          dp[i][0] = Math.min(dp[i][0], dp[i-1][1]+a[i-1]);
          dp[i][1] = dp[i-1][1]+b[i-1];
          dp[i][1] = Math.min(dp[i][1], dp[i-1][0]+c+b[i-1]);
        }
        for(int i = 1; i <= n; i++) writer.print(Math.min(dp[i][0], dp[i][1])+" ");
        br.close();
        writer.close();
    }
}


import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class Main
{
	static final int mod = (int)1e9+7;
	static int N = 39;
	public static void main(String[] args) throws Exception
	{
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		long c = in.nextInt();
		long[] a = new long[n];
		long[] b = new long[n];
		for(int i = 1; i < n; i++)
			a[i] = in.nextInt();
		for(int i = 1; i < n; i++)
			b[i] = in.nextInt();
		long[][] dp = new long[n][2];
		out.print(0 + " ");
		dp[1][1] = c + b[1];
		dp[1][0] = a[1];
		out.print(Math.min(dp[1][0], dp[1][1]) + " ");
		for(int i = 2; i < n; i++)
		{
			dp[i][0] = Math.min(dp[i-1][0], dp[i-1][1]) + a[i];
			dp[i][1] = Math.min(dp[i-1][0] + c, dp[i-1][1]) + b[i];
			out.print(Math.min(dp[i][0], dp[i][1]) + " ");
		}
		out.flush();
	}
}

class FastReader
{
	BufferedReader br;
	StringTokenizer st;

	public FastReader()
	{
	    br = new BufferedReader(new InputStreamReader(System.in));
	}

	public String next() throws IOException
	{
	    if(st == null || !st.hasMoreElements())
	    {
	        st = new StringTokenizer(br.readLine());
	    }

	    return st.nextToken();
	}

	public int nextInt() throws IOException
	{
	    return Integer.parseInt(next());
	}

	public long nextLong() throws IOException
	{
	    return Long.parseLong(next());
	}

	public String nextLine() throws IOException
	{
		return br.readLine();
	}
}


import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class Main
{
	static final int mod = (int)1e9+7;
	static int N = 39;
	public static void main(String[] args) throws Exception
	{
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		long c = in.nextInt();
		long[] a = new long[n];
		long[] b = new long[n];
		for(int i = 1; i < n; i++)
			a[i] = in.nextInt();
		for(int i = 1; i < n; i++)
			b[i] = in.nextInt();
		long[] dp = new long[n];
		boolean[] elevator = new boolean[n];
		out.print(0 + " ");
		for(int i = 1; i < n; i++)
		{
			dp[i] = dp[i - 1];
			elevator[i] = elevator[i - 1];
			long d = -1;
			if(elevator[i])
			{
				if(a[i] < b[i])
				{
					d = a[i];
					elevator[i] = false;
				}
				else
					d = b[i];
			}
			else if(a[i] < b[i] + c)
			{
				d = a[i];
				elevator[i] = false;
			}
			else
			{
				d = b[i] + c;
				elevator[i] = true;
			}
			dp[i] += d;
			out.print(dp[i] + " ");
		}
		out.flush();
	}
}

class FastReader
{
	BufferedReader br;
	StringTokenizer st;

	public FastReader()
	{
	    br = new BufferedReader(new InputStreamReader(System.in));
	}

	public String next() throws IOException
	{
	    if(st == null || !st.hasMoreElements())
	    {
	        st = new StringTokenizer(br.readLine());
	    }

	    return st.nextToken();
	}

	public int nextInt() throws IOException
	{
	    return Integer.parseInt(next());
	}

	public long nextLong() throws IOException
	{
	    return Long.parseLong(next());
	}

	public String nextLine() throws IOException
	{
		return br.readLine();
	}
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        int n = nextInt();
        int c = nextInt();
        int[] a = new int[n - 1];
        int[] b = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            a[i] = nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            b[i] = nextInt();
        }
        int[] dp = new int[n];
        int[] p = new int[n];
        dp[0] = 0;
        if (c + b[0] < a[0]) {
            p[1] = 1;
            dp[1] = c + b[0];
        } else {
            p[1] = 0;
            dp[1] = a[0];
        }
        for (int i = 2; i < n; i++) {
            if (p[i - 1] == 0) {
                if (dp[i - 1] + a[i - 1] < dp[i - 1] + c + b[i - 1]) {
                    dp[i] = dp[i - 1] + a[i - 1];
                    p[i] = 0;
                } else {
                    dp[i] = dp[i - 1] + c + b[i - 1];
                    p[i] = 1;
                }
            } else {
                if (dp[i - 1] + a[i - 1] < dp[i - 1] + b[i - 1]) {
                    dp[i] = dp[i - 1] + a[i - 1];
                    p[i] = 0;
                } else {
                    dp[i] = dp[i - 1] + b[i - 1];
                    p[i] = 1;
                }
            }
        }
        for (int i = 0; i < n; i++) {
            out.print(dp[i] + " ");
        }
        out.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        int n = nextInt();
        int c = nextInt();
        int[] a = new int[n - 1];
        int[] b = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            a[i] = nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            b[i] = nextInt();
        }
        int[] dp = new int[n];
        int[] p = new int[n];
        dp[0] = 0;
        if (c + b[0] <= a[0]) {
            p[1] = 2;
            dp[1] = c + b[0];
        } else {
            p[1] = 1;
            dp[1] = a[0];
        }
        for (int i = 2; i < n; i++) {
            if (p[i - 1] == 1) {
                if (dp[i - 1] + a[i - 1] < dp[i - 1] + c + b[i - 1]) {
                    dp[i] = dp[i - 1] + a[i - 1];
                    p[i] = 1;
                } else {
                    dp[i] = dp[i - 1] + c + b[i - 1];
                    p[i] = 2;
                }
            } else {
                if (dp[i - 1] + a[i - 1] < dp[i - 1] + b[i - 1]) {
                    dp[i] = dp[i - 1] + a[i - 1];
                    p[i] = 1;
                } else {
                    dp[i] = dp[i - 1] + b[i - 1];
                    p[i] = 2;
                }
            }
        }
        for (int i = 0; i < n; i++) {
            out.print(dp[i] + " ");
        }
        out.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    static int inf = Integer.MAX_VALUE / 2;
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        int n = nextInt();
        int c = nextInt();
        int[] a = new int[n - 1];
        int[] b = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            a[i] = nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            b[i] = nextInt();
        }
        int[] dpa = new int[n];
        int[] dpb = new int[n];
        Arrays.fill(dpa, inf);
        Arrays.fill(dpb, inf);
        dpa[0] = 0;
        dpb[0] = c;
        for (int i = 1; i < n; i++) {
            dpa[i] = min(dpa[i - 1] + a[i - 1], dpb[i - 1] + a[i - 1]);
            dpb[i] = min(dpa[i - 1] + c + b[i - 1], dpb[i - 1] + b[i - 1]);
        }
        for (int i = 0; i < n; i++) {
            out.print(min(dpa[i], dpb[i]) + " ");
        }
        out.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;

public class Problem_1249E_By_Elevator_Or_Stairs {
	int n;
	int c;
	int[] a;
	int[] b;
	int[] trap;
	int[] lift;

	String solve() {
		trap = new int[n + 1]; // cost to arrive at the stairs at level i
		lift = new int[n + 1]; // cost to arrive in the elevator at level i
		// trap[i]     -> trap[i + 1] cost a[i]
		// trap[i]     -> lift[i + 1] cost b[i]
		// lift[i]     -> lift[i + 1] cost b[i]
		// lift[i + 1] -> trap[i + 1] cost c
		trap[1] =  0;
		lift[1] = Integer.MAX_VALUE / 2;
		for (int i = 1; i <= n - 1; i++) {
			lift[i + 1] = Math.min(trap[i] + b[i], lift[i] + b[i]);
			trap[i + 1] = Math.min(trap[i] + a[i],  lift[i + 1] + c);
		}
		StringBuilder sb = new StringBuilder();
		for (int i = 1; i <= n; i++) {
			if (i != 1) sb.append(" ");
			sb.append(trap[i]);
		}
		return sb.toString();
	}

	void parse(FastScanner sc) {
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for (int i = 1; i <= n - 1; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 1; i <= n - 1; i++) {
			b[i] = sc.nextInt();
		}
	}

	void solveOne(InputStream in, PrintWriter pw) throws IOException {
		Locale.setDefault(Locale.ROOT);
		try (FastScanner sc = new FastScanner(in)) {
			parse(sc);
		}
		pw.println(solve());
	}

	public static void main(String[] args) throws IOException {
		Locale.setDefault(Locale.ROOT);
		try (PrintWriter pw = new PrintWriter(System.out)) {
			new Problem_1249E_By_Elevator_Or_Stairs().solveOne(System.in, pw);
			pw.flush();
		}
	}

	public static class FastScanner implements Closeable {
		private final BufferedReader br;
		private StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		public String next() {
			while (st == null || !st.hasMoreElements()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (IOException e) { throw new RuntimeException(e); }
			}
			return st.nextToken();
		}

		public int nextInt() { return Integer.parseInt(next()); }
		public long nextLong() { return Long.parseLong(next()); }
		public double nextDouble() { return Double.parseDouble(next()); }
		public String nextLine() {
			// Sla rest van huidige regel over en retourneer de volgende.
			// Dit is ander gedrag dan Scanner, die de rest van de huidige regel
			// retourneert, zelfs als die geen tokens meer bevat.
			st = null;
			try { return br.readLine(); }
			catch (IOException e) { throw new RuntimeException(e); }
		}

		@Override
		public void close() throws IOException { br.close(); }
	}
}


import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Scanner;

public class Problem_1249E_By_Elevator_Or_Stairs {
	int n;
	int c;
	int[] a;
	int[] b;
	int[] trap;
	int[] lift;

	String solve() {
		trap = new int[n + 1]; // cost to arrive at the stairs at level i
		lift = new int[n + 1]; // cost to arrive in the elevator at level i
		// trap[i]     -> trap[i + 1] cost a[i]
		// trap[i]     -> lift[i + 1] cost b[i]
		// lift[i]     -> lift[i + 1] cost b[i]
		// lift[i + 1] -> trap[i + 1] cost c
		trap[1] =  0;
		lift[1] = Integer.MAX_VALUE / 2;
		for (int i = 1; i <= n - 1; i++) {
			lift[i + 1] = Math.min(trap[i] + b[i], lift[i] + b[i]);
			trap[i + 1] = Math.min(trap[i] + a[i],  lift[i + 1] + c);
		}
		StringBuilder sb = new StringBuilder();
		for (int i = 1; i <= n; i++) {
			if (i != 1) sb.append(" ");
			sb.append(trap[i]);
		}
		return sb.toString();
	}

	void parse(Scanner sc) {
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for (int i = 1; i <= n - 1; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 1; i <= n - 1; i++) {
			b[i] = sc.nextInt();
		}
	}

	void solveOne(InputStream in, PrintWriter pw) {
		Locale.setDefault(Locale.ROOT);
		try (Scanner sc = new Scanner(in)) {
			parse(sc);
		}
		pw.println(solve());
	}

	public static void main(String[] args) {
		Locale.setDefault(Locale.ROOT);
		try (PrintWriter pw = new PrintWriter(System.out)) {
			new Problem_1249E_By_Elevator_Or_Stairs().solveOne(System.in, pw);
			pw.flush();
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer stoken = new StringTokenizer(reader.readLine());
        int n = Integer.parseInt(stoken.nextToken())-1;
        int c = Integer.parseInt(stoken.nextToken());
        stoken = new StringTokenizer(reader.readLine());
        int[] a = new int[n];
        for (int i=0; i<n; i++) a[i] = Integer.parseInt(stoken.nextToken());
        stoken = new StringTokenizer(reader.readLine());
        int[] b = new int[n];
        for (int i=0; i<n; i++) b[i] = Integer.parseInt(stoken.nextToken());
        StringBuilder ans = new StringBuilder();
        ans.append("0 ");
        int[][] res = new int[n][2];
        res[0] = new int[]{a[0], b[0]+c};
        ans.append(Math.min(res[0][0], res[0][1])).append(" ");
        for (int i=1; i<n; i++) {
            res[i] = new int[]{a[i] + Math.min(res[i-1][0], res[i-1][1]),
            b[i] + Math.min(res[i-1][0]+c, res[i-1][1])};
            ans.append(Math.min(res[i][0], res[i][1])).append(" ");
        }
        System.out.println(ans);
    }
}


import java.util.Scanner;

public class Apartment {

	private static int n, c;
	private static int[] a, b;
	private static boolean[] last; //false for stairs, true for elevator

	public static void main(String[] args) {
		read();
		int[] minTimes;
		minTimes= findMinTimes();
		printMinTimes(minTimes);
	}

	public static void read() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for(int i=1; i<n; i++) a[i] = sc.nextInt();
		for(int i=1; i<n; i++) b[i] = sc.nextInt();
		sc.close();
	}

	public static int[] findMinTimes() {
		int[] minTimes = new int[n];
		boolean currentLast;
		minTimes[0] = 0;
		currentLast = b[1] + c<=a[1] ? true : false;
		minTimes[1] = Math.min(a[1], b[1] + c);
		for(int i=2; i<n; i++) {
			if(currentLast) {
				minTimes[i] = Math.min(a[i], b[i]) + minTimes[i-1];
				currentLast = b[i]<=a[i] ? true : false;
			}
			else {
				minTimes[i] = Math.min(a[i], b[i] + c) + minTimes[i-1];
				currentLast = b[i] + c<=a[i] ? true : false;
			}
		}
		return minTimes;
	}

	public static void printMinTimes(int[] arr) {
		for(int i=0; i<arr.length - 1; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.print(arr[arr.length-1]);
	}
}


import java.util.Scanner;

public class Apartment {

	private static int n, c;
	private static int[] a, b;
	private static boolean[] last; //false for stairs, true for elevator

	public static void main(String[] args) {
		read();
		int[] minTimes;
		if(n==2) {
			minTimes = new int[2];
			minTimes[0] = 0;
			minTimes[1] = Math.min(a[1], b[1] + c);
		}
		else {
			minTimes= findMinTimes();
		}
		printMinTimes(minTimes);
	}

	public static void read() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for(int i=1; i<n; i++) a[i] = sc.nextInt();
		for(int i=1; i<n; i++) b[i] = sc.nextInt();
		sc.close();
	}

	public static int[] findMinTimes() {
		int[] minTimes = new int[n];
		boolean currentLast;
		minTimes[0] = 0;
		currentLast = a[1]<(b[1] +c) ? false : true;
		minTimes[1] = Math.min(a[1], b[1] + c);
		for(int i=2; i<n; i++) {
			if(currentLast) {
				minTimes[i] = Math.min(a[i], b[i]) + minTimes[i-1];
				currentLast = a[i]<b[i] ? false : true;
			}
			else {
				minTimes[i] = Math.min(a[i], b[i] + c) + minTimes[i-1];
				currentLast = a[i]<(b[i] + c) ? false : true;
			}
		}
		return minTimes;
	}

	public static void printMinTimes(int[] arr) {
		for(int i=0; i<arr.length - 1; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.print(arr[arr.length-1]);
	}
}


import java.util.Scanner;

public class Apartment {

	private static int n, c;
	private static int[] a, b;
	private static boolean[] last; //false for stairs, true for elevator

	public static void main(String[] args) {
		read();
		int[] minTimes = findMinTimes();
		printMinTimes(minTimes);
	}

	public static void read() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for(int i=1; i<n; i++) a[i] = sc.nextInt();
		for(int i=1; i<n; i++) b[i] = sc.nextInt();
		sc.close();
	}

	public static int[] findMinTimes() {
		int[] minTimes = new int[n];
		boolean currentLast;
		minTimes[0] = 0;
		currentLast = a[1]<(b[1] +c) ? false : true;
		minTimes[1] = Math.min(a[1], b[1] + c);
		for(int i=2; i<n; i++) {
			if(currentLast) {
				minTimes[i] = Math.min(a[i], b[i]) + minTimes[i-1];
				currentLast = a[i]<b[i] ? false : true;
			}
			else {
				minTimes[i] = Math.min(a[i], b[i] + c) + minTimes[i-1];
				currentLast = a[i]<(b[i] + c) ? false : true;
			}
		}
		return minTimes;
	}

	public static void printMinTimes(int[] arr) {
		for(int i=0; i<arr.length; i++) {
			System.out.print(arr[i] + " ");
		}
	}
}


import java.util.Scanner;

public class Apartment {

	private static int n, c;
	private static int[] a, b;
	private static boolean[] last; //false for stairs, true for elevator

	public static void main(String[] args) {
		read();
		int[] minTimes;
		minTimes= findMinTimes();
		printMinTimes(minTimes);
	}

	public static void read() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for(int i=1; i<n; i++) a[i] = sc.nextInt();
		for(int i=1; i<n; i++) b[i] = sc.nextInt();
		sc.close();
	}

	public static int[] findMinTimes() {
		int[] minTimes = new int[n];
		int[] elevator = new int[n], stairs = new int[n];
		boolean currentLast;
		stairs[0] = 0;
		elevator[0] = c;
		for(int i = 1; i<n; i++) {
			stairs[i] = Math.min(stairs[i-1], elevator[i-1]) + a[i];
			elevator[i] = Math.min(stairs[i-1] + c, elevator[i-1]) + b[i];
			minTimes[i] = Math.min(stairs[i], elevator[i]);
		}

		return minTimes;
	}

	public static void printMinTimes(int[] arr) {
		for(int i=0; i<arr.length - 1; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.print(arr[arr.length-1]);
	}
}


import java.util.Scanner;

public class Apartment {

	private static int n, c;
	private static int[] a, b;
	private static boolean[] last; //false for stairs, true for elevator

	public static void main(String[] args) {
		read();
		int[] minTimes = findMinTimes();
		printMinTimes(minTimes);
	}

	public static void read() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		c = sc.nextInt();
		a = new int[n];
		b = new int[n];
		for(int i=1; i<n; i++) a[i] = sc.nextInt();
		for(int i=1; i<n; i++) b[i] = sc.nextInt();
		sc.close();
	}

	public static int[] findMinTimes() {
		int[] minTimes = new int[n];
		boolean currentLast;
		minTimes[0] = 0;
		currentLast = a[1]<(b[1] +c) ? false : true;
		minTimes[1] = Math.min(a[1], b[1] + c);
		for(int i=2; i<n; i++) {
			if(currentLast) {
				minTimes[i] = Math.min(a[i], b[i]) + minTimes[i-1];
				currentLast = a[i]<b[i] ? false : true;
			}
			else {
				minTimes[i] = Math.min(a[i], b[i] + c) + minTimes[i-1];
				currentLast = a[i]<(b[i] + c) ? false : true;
			}
		}
		return minTimes;
	}

	public static void printMinTimes(int[] arr) {
		for(int i=0; i<arr.length - 1; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.print(arr[arr.length-1]);
	}
}


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main6{

static class Pair
    {
        int x;
        int y;
		int z;
		int d;
        public Pair(int x,int y,int z,int d)
        {
            this.x= x;
            this.y= y;
			this.z=z;
			this.d=d;
        }

    @Override
            public int hashCode()
            {
                final int temp = 14;
                int ans = 1;
                ans =x*31+y*13;
                return ans;
            }

            // Equal objects must produce the same
            // hash code as long as they are equal
        @Override
        public boolean equals(Object o)
        {
            if (this == o) {
                return true;
            }
            if (o == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair other = (Pair)o;
            if (this.x != other.x || this.y!=other.y) {
                return false;
            }
            return true;
        }

    }
    static class Pair1
    {
        String x;
        int y;
        int z;

    }
    static class Compare
    {
        static void compare(Pair arr[], int n)
        {
            // Comparator to sort the pair according to second element
            Arrays.sort(arr, new Comparator<Pair>() {
                @Override public int compare(Pair p1, Pair p2)
                {
                    if(p1.x>p2.x)
                    {
                        return 1;
                    }
                    else if(p1.x<p2.x)
                    {
                        return -1;
                    }
                    else
                    {
                        if(p1.y>p2.y)
						{
							return 1;
						}
						else if(p1.y<p2.y)
						{
							return -1;
						}
						else
						{
							if(p1.z>p2.z)
							{
								return 1;
							}
							else if(p1.z<p2.z)
							{
								return -1;
							}
							else
								return 0;
						}
                    }
                }
            });
        }

    }

    public static long pow(long a, long b)
    {
        long result=1;
        while(b>0)
        {
            if (b % 2 != 0)
            {
                result=(result*a)%1000000007;
                b--;
            }
            a=(a*a)%1000000007;
            b /= 2;
        }
        return result;
    }
    public static long fact(long num)
    {
                long value=1;
                int i=0;
                for(i=2;i<num;i++)
                {
                    value=((value%mod)*i%mod)%mod;
                }
                return value;
            }
            public static long gcd(long a, long b)
            {
                if (a == 0)
                    return b;
                return gcd(b%a, a);
            }

    /*        public static long lcm(long a,long b)
            {
                return a * (b / gcd(a, b));
            }
        */    public static long sum(int h)
            {
                return (h*(h+1)/2);
            }
        /*   public static void dfs(int parent,boolean[] visited,int[] dp)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
                for(int i=0;i<arr.size();i++)
                {
                    int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
                        dfs(num,visited,dp);
                    }
                    dp[parent]=Math.max(dp[num]+1,dp[parent]);
                }
            }
        //    static int flag1=0;
            static int[] dis;*/
            static int mod=1000000007;
            static ArrayList<ArrayList<Integer>> graph;
            static ArrayList<ArrayList<Integer>> g;

       /*    public static void bfs(int num,int size)
            {
                boolean[] visited=new boolean[size+1];
                Queue<Integer> q=new LinkedList<>();
                q.add(num);
                ans[num]=1;
                visited[num]=true;
                while(!q.isEmpty())
                {
                    int x=q.poll();
                    ArrayList<Integer> al=graph.get(x);
                    for(int i=0;i<al.size();i++)
                    {
                        int y=al.get(i);
                        if(visited[y]==false)
                        {
                            q.add(y);
                            ans[y]=ans[x]+1;
                            visited[y]=true;
                        }
                    }
                }
            }
            static int[] ans;*/

        //    static int[] a;
            public static int[] sort(int[] a)
            {
                int n=a.length;
                ArrayList<Integer> ar=new ArrayList<>();
                for(int i=0;i<a.length;i++)
                {
                    ar.add(a[i]);
                }
                Collections.sort(ar);
                for(int i=0;i<n;i++)
                {
                    a[i]=ar.get(i);
                }
                return a;
            }
			static class pqcomparator implements Comparator<Pair>
			{
				public int compare(Pair p1 ,Pair p2)
				{
					if(p1.y>p2.y)
					{
						return -1;
					}
					else
						return 1;
				}
			}
			public static void dfs(int parent,boolean[] visited)
            {
                ArrayList<Integer> arr=new ArrayList<Integer>();
                arr=graph.get(parent);
                visited[parent]=true;
				ar.add(parent);
				count++;
				for(int i=0;i<arr.size();i++)
                {
					int num=(int)arr.get(i);
                    if(visited[num]==false)
                    {
						dfs(num,visited);
                    }
            	 }
            }
			static int count=0;
			static ArrayList<Integer> ar;
			static public void main(String args[])throws IOException
            {
				int t=1;
				StringBuilder sb=new StringBuilder();
				while(t-->0)
				{
					int n=i();
					int c=i();
					int[] a=new int[n-1];
					long[] sum=new long[n-1];
					for(int i=0;i<n-1;i++)
					{
						a[i]=i();
					}
					sum[0]=a[0];
					for(int i=1;i<n-1;i++)
						sum[i]=sum[i-1]+a[i];

					int[] b=new int[n-1];
					for(int i=0;i<n-1;i++)
					{
						b[i]=i();
					}
					long[] diff=new long[n-1];
					diff[0]=b[0];
					for(int i=1;i<n-1;i++)
						diff[i]=diff[i-1]+b[i];
					long[] dp=new long[n];
					dp[0]=0;
					boolean stairs=false,ele=false;
					if(b[0]+c>a[0])
					{
						stairs=true;
					}
					else
					{
						ele=true;
					}
					dp[1]=Math.min(b[0]+c,a[0]);
					int flag=0;
					if(ele==true)
					{
						flag=1;
					}
					for(int i=2;i<n;i++)
					{
						if(stairs==true)
						{
							if(a[i-1]<b[i-1]+c)
							{
								dp[i]=dp[i-1]+a[i-1];
								ele=false;
								flag=0;
								stairs=true;
							}
							else if(a[i-1]>b[i-1]+c)
							{
								dp[i]=dp[i-1]+b[i-1]+c;
								flag=1;
								stairs=false;
								ele=true;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1]+c;
								ele=true;
								stairs=false;
								flag=1;
							}
						}
						else if(ele==true)
						{
							if(a[i-1]<b[i-1])
							{
								dp[i]=dp[i-1]+a[i-1];
								flag=0;
								ele=false;
								stairs=true;
							}
							else if(a[i-1]>b[i-1])
							{
								dp[i]=dp[i-1]+b[i-1];
								stairs=false;
								flag=1;
								ele=true;
							}
							else
							{
								dp[i]=dp[i-1]+b[i-1];
								flag=1;
								ele=true;
								stairs=false;
							}
						}
					}
					for(int i=0;i<n;i++)
					{
						if(i>=1)
							dp[i]=Math.min(diff[i-1]+c,Math.min(sum[i-1],dp[i]));
						sb.append(dp[i]+" ");
					}
					sb.append("\n");
				}
				System.out.print(sb.toString());
			}
			static boolean areParenthesisBalanced(char exp[])
			{
			   Stack<Character> st=new Stack<>();
			   for(int i=0;i<exp.length;i++)
			   {
					if (exp[i] == '(')
						st.push(exp[i]);
					if (exp[i] == ')')
					{
						if (st.isEmpty())
						{
						   return false;
						}
						else if ( !isMatchingPair(st.pop(), exp[i]) )
						{
						   return false;
						}
					}

				}
				if (st.isEmpty())
					return true;
				else
				 {
					 return false;
				 }
			}
			static boolean isMatchingPair(char character1, char character2)
			{
			   if (character1 == '(' && character2 == ')')
				 return true;
			   else
				 return false;
			}
            /**/
            static InputReader in=new InputReader(System.in);
                static OutputWriter out=new OutputWriter(System.out);
                public static long l()
                {
                    String s=in.String();
                    return Long.parseLong(s);
                }
                public static void pln(String value)
                {
                    System.out.println(value);
                }
                public static int i()
                {
                    return in.Int();
                }
                public static String s()
                {
                    return in.String();
                }
    }

        class InputReader {

            private InputStream stream;
            private byte[] buf = new byte[1024];
            private int curChar;
            private int numChars;
            private SpaceCharFilter filter;

            public InputReader(InputStream stream) {
                this.stream = stream;
            }

            public int read() {
                if (numChars== -1)
                    throw new InputMismatchException();
                if (curChar >= numChars) {
                    curChar = 0;
                    try {
                        numChars = stream.read(buf);
                    } catch (IOException e) {
                        throw new InputMismatchException();
                    }
                    if (numChars <= 0)
                        return -1;
                }
                return buf[curChar++];
            }

            public int Int() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = read();
                }
                int res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = read();
                } while (!isSpaceChar(c));
                return res * sgn;
            }

            public String String() {
                int c = read();
                while (isSpaceChar(c))
                    c = read();
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = read();
                } while (!isSpaceChar(c));
                return res.toString();
            }

            public boolean isSpaceChar(int c) {
                if (filter != null)
                    return filter.isSpaceChar(c);
                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }

            public String next() {
                return String();
            }

            public interface SpaceCharFilter {
                public boolean isSpaceChar(int ch);
            }
        }

        class OutputWriter {
            private final PrintWriter writer;

            public OutputWriter(OutputStream outputStream) {
                writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
            }

            public OutputWriter(Writer writer) {
                this.writer = new PrintWriter(writer);
            }

            public void print(Object...objects) {
                for (int i = 0; i < objects.length; i++) {
                    if (i != 0)
                        writer.print(' ');
                    writer.print(objects[i]);
                }
            }

            public void printLine(Object...objects) {
                print(objects);
                writer.println();
            }

            public void close() {
                writer.close();
            }

            public void flush() {
                writer.flush();
            }

            }

            class IOUtils {

            public static int[] readIntArray(InputReader in, int size) {
                int[] array = new int[size];
                for (int i = 0; i < size; i++)
                    array[i] = in.Int();
                return array;
            }

            }