n = int(input()) A = list(map(int, input().split())) dp = [[0] * 2 for _ in range(n)] dp[0][1] = 1 for i, a in enumerate(A[1:], 1): dp[i][0] = max(dp[i - 1]) if A[i] > A[i - 1]: dp[i][1] = max(dp[i - 1][0] + 1, dp[i - 1][1]) elif A[i] == A[i - 1]: dp[i][1] = max(dp[i - 1]) + 1 else: dp[i][1] = dp[i - 1][0] + 1 print(max(dp[-1]))