import std.stdio, std.conv, std.string, std.range, std.algorithm, std.array,
  std.functional, std.container, std.typecons;

void main() {
  int N = readln.chomp.to!int;
  int[] A = readln.split.to!(int[]);
  int[] B = new int[N];

  B[0] = A.sum - 2 * iota(1, N-1, 2).map!(i => A[i]).sum;
  foreach(i; 1..N) {
    B[i] = 2*A[i-1] - B[i-1];
  }

  foreach(b; B) {
    write(b, " ");
  }
}
