# -*- coding: utf-8 -*- n = int(input()) al = list(map(int, input().split())) cnt = 0 c = al[0] for i in range(1,n): if c