def main():

    *x, = list(map(int, input().split()))

    print((x.index(0) + 1))





if __name__ == '__main__':

    main()



# import sys

# input = sys.stdin.readline

# 

# sys.setrecursionlimit(10 ** 7)

# 

# (int(x)-1 for x in input().split())

# rstrip()

#

# def binary_search(*, ok, ng, func):

#     while abs(ok - ng) > 1:

#         mid = (ok + ng) // 2

#         if func(mid):

#             ok = mid

#         else:

#             ng = mid

#     return ok

def main():

    for i, x in enumerate(map(int, input().split()), start=1):

        if x == 0:

            print(i)

            return





if __name__ == '__main__':

    main()

def main():
    (*x,) = list(map(int, input().split()))
    print((x.index(0) + 1))


if __name__ == "__main__":
    main()
# import sys
# input = sys.stdin.readline
#
# sys.setrecursionlimit(10 ** 7)
#
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

def main():
    for i, x in enumerate(map(int, input().split()), start=1):
        if x == 0:
            print(i)
            return


if __name__ == "__main__":
    main()

-    (*x,) = list(map(int, input().split())) -    print((x.index(0) + 1)) +    for i, x in enumerate(map(int, input().split()), start=1): +        if x == 0: +            print(i) +            return -# import sys -# input = sys.stdin.readline -# -# sys.setrecursionlimit(10 ** 7) -# -# (int(x)-1 for x in input().split()) -# rstrip() -# -# def binary_search(*, ok, ng, func): -#     while abs(ok - ng) > 1: -#         mid = (ok + ng) // 2 -#         if func(mid): -#             ok = mid -#         else: -#             ng = mid -#     return ok