n = gets.chomp.to_i

boxes = gets.chomp.split(' ').map(&:to_i)

ball_num = boxes.count(1)

if ball_num % 2 == boxes[0]
  puts ball_num
  boxes_in_ball = []
  n.times { |i| boxes_in_ball << i+1 if boxes[i] == 1 }
  puts boxes_in_ball.join(' ')
else
  puts '-1'
end