import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val av = Vector.fill(n)(sc.nextInt)

  val rv = av.zipWithIndex.
    map(t => (t._1, t._2 + 1)).
    foldRight(Vector.empty[Int]){case ((a, i), list ) =>

      val re = av.drop(i - 1).sum % 2

      if(re == 1 ) i +: list
      else list
  }

  val m = rv.size
  println(m)
  rv.zipWithIndex.foreach{case (v,i) =>
    print{
      if(i != m) s"$v "
      else s"v"
    }
  }

}
