using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Numerics; using BI = System.Numerics.BigInteger; class TEST{ static void Main(){ Sol mySol =new Sol(); mySol.Solve(); } } class Sol{ public void Solve(){ BI lmin = 1; BI rmax = (BI)1e18; BI[] A = new BI[N+1]; A[0] = 1; BI sig = 1; for(int i=1;i<=N;i++){ A[i] = (B[i-1] - A[i-1]) * sig; sig *= -1; } BI min = A.Min(); for(int i=0;i<=N;i++) A[i] -= (min-1); if(A.Max() > rmax){ Console.WriteLine(-1); }else{ Console.WriteLine(N+1); Console.WriteLine(String.Join("\n",A)); } } int N; BI[] B; public Sol(){ N = ri(); B = new BI[N]; for(int i=0;iint.Parse(e));} static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));} static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));} }