import numpy as np

N,T = list(map(int,input().split()))

A = np.array(input().split(), dtype=np.int64)



A_cummin = np.minimum.accumulate(A)



profit = A - A_cummin



ans = (profit == profit.max()).sum()



print(ans)

import numpy as np

N,T = list(map(int,input().split()))

A = np.array(list(map(int,input().split())))

A_cummin = np.minimum.accumulate(A)

profit = A - A_cummin

ans = (profit == profit.max()).sum()

print(ans)

import numpy as np

N, T = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.int64)
A_cummin = np.minimum.accumulate(A)
profit = A - A_cummin
ans = (profit == profit.max()).sum()
print(ans)

import numpy as np

N, T = list(map(int, input().split()))
A = np.array(list(map(int, input().split())))
A_cummin = np.minimum.accumulate(A)
profit = A - A_cummin
ans = (profit == profit.max()).sum()
print(ans)

-A = np.array(input().split(), dtype=np.int64) +A = np.array(list(map(int, input().split())))