def count_left(now):
min = float('inf')
cnt = 0
for idx in range(now-1, -1, -1):
inc = (buildings[now] - buildings[idx]) / (now - idx)
if min > inc:
min = inc
cnt += 1
return cnt
def count_right(now):
max = -float('inf')
cnt = 0
for idx in range(now+1, N):
inc = (buildings[now] - buildings[idx]) / (now - idx)
if max < inc:
max = inc
cnt += 1
return cnt
N = int(input())
buildings = list(map(int, input().split()))
ret = 0
for i in range(N):
left = count_left(i)
right = count_right(i)
ret = max(ret, left + right)
print(ret)