# Time Complexity: O(n^2)
# TLE
n, N = int(raw_input()), []
for i in xrange(n):
    N.append(int(raw_input()))

def LIS(lis, A, flag):
    '''
    '''
    if flag == 1 and len(A) != 0:
        lis.append(A[0])

    if len(A) == 0:
        if len(lis) == 0: return 0
        return len(lis)
    elif len(lis) > 1:
        if lis[-2] >= lis[-1]:
            return 0

    return max(LIS(lis[:], A[1:], 1), LIS(lis[:], A[1:], 0))

print max(LIS([], N[:], 1), LIS([], N[:], 0))