n = int(input())
arr = list(map(int, input().split()))
co = 0
for i in range(1, len(arr), 1):
    pr = arr[i - 1]
    if pr < arr[i]:
        co += 1
print(co)

96ee0b82b01b73b34071048e6c9d7224584bf9b8
<mask token>

<mask token>
for i in range(1, len(arr), 1):
    pr = arr[i - 1]
    if pr < arr[i]:
        co += 1
print(co)

n = int(input())
arr = list(map(int, input().split()))
co = 0
for i in range(1, len(arr), 1):
    pr = arr[i - 1]
    if pr < arr[i]:
        co += 1
print(co)
