import std.stdio, std.string, std.conv;

void main() {
    int n = readln.chomp.to!int;
    int[] a = readln.split.to!(int[]);
    int[] rain = new int[n];
    foreach (i; 0 .. n) {
        rain[0] += (-1) ^^ i * a[i];
    }
    foreach (i; 1 .. n) {
        rain[i] = 2 * a[i-1] - rain[i-1];
    }
    rain.to!(string[]).join(" ").writeln;
}