import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); int r0 = 0; int r1 = 0; int r2 = 0; for(int i = 0; i <= d; i++) { int a = sc.nextInt(); if(i == 0) r0 = a; r1 += a; if(i % 2 == 0) { r2 += a; } else { r2 -= a; } } int c = r0; int a = (r1 + r2 - 2 * c) / 2; int b = r1 - a - c; if(a != 0) { System.out.println(2); System.out.println(c + " " + b + " " + a); } else if(b != 0) { System.out.println(1); System.out.println(c + " " + b); } else { System.out.println(0); System.out.println(c); } } }