package main import ( "fmt" ) func main() { var d int fmt.Scan(&d) var a [10010]int for i := 0; i <= d; i++ { fmt.Scan(&a[i]) } for i := d; i >= 3; i-- { a[i-2] += a[i] a[i] = 0 } switch { case a[2] != 0: fmt.Println(2) fmt.Println(a[0], a[1], a[2]) case a[1] != 0: fmt.Println(1) fmt.Println(a[0], a[1]) default: fmt.Println(0) fmt.Println(a[0]) } }