You have an integer variable x. Initially, x=0.  Some person gave you a string S of length N, and using the string you performed the following operation N times. In the i-th operation, you incremented the value of x by 1 if S_i=`I`, and decremented the value of x by 1 if S_i=`D`.  Find the maximum value taken by x during the operations (including before the first operation, and after the last operation).
n = int(input())
s = list(input())
count = 0
for i in s:
    if i =='I':
        count += 1
    elif i == 'D':
        count -= 1
print(count)
n = int(input())
s = list(input())
count = 0
ans = [0]
for i in s:
    if i == 'I':
        count += 1
    elif i == 'D':
        count -= 1
    ans.append(count)
print(max(ans))