from sys import stdin n, *b = map(int, stdin.read().split()) maxa = max(b) a = [] val = 0 for i in range(n): if b[i] != 0: a.append(b[i]) else: val += 1 n = len(a) ans = (1<