-module('Main').
-export([main/1]).

main(_) -> 
    {ok, [A, B, C, D, E]} = io:fread("", "~d ~d ~d ~d ~d"),
    Ans = find_zero([A, B, C, D, E]),
    io:format("~p~n", [Ans]),
    halt().

find_zero(L) ->
    find_zero(L, 1).
find_zero([0|_T], Index) ->
    Index;
find_zero([_H|T], Index) ->
    find_zero(T, Index + 1).
