Option Explicit On
Imports System

Module Program
    Sub Main(args As String())

        Dim tmp As String() = Split(Console.ReadLine(), " ")

        For i As Integer = 0 To 4
            If tmp(i) = "0" Then
                Console.WriteLine(i + 1)
            End If
        Next

    End Sub

End Module
