defmodule Main do
  def main do
    arr =
      IO.gets("")
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)

    IO.inspect(Enum.find_index(arr, fn x -> x == 0 end) + 1)
  end
end