l = list(map(int, input().split())) n = int(input()) print(l.index(n))