Vasya has a pile, that consists of some number of stones. $n$ times he either took one stone from the pile or added one stone to the pile. The pile was non-empty before each operation of taking one stone from the pile.

You are given $n$ operations which Vasya has made. Find the minimal possible number of stones that can be in the pile after making these operations.


-----Input-----

The first line contains one positive integer $n$ — the number of operations, that have been made by Vasya ($1 \leq n \leq 100$).

The next line contains the string $s$, consisting of $n$ symbols, equal to "-" (without quotes) or "+" (without quotes). If Vasya took the stone on $i$-th operation, $s_i$ is equal to "-" (without quotes), if added, $s_i$ is equal to "+" (without quotes).


-----Output-----

Print one integer — the minimal possible number of stones that can be in the pile after these $n$ operations.


-----Examples-----
Input
3
---

Output
0
Input
4
++++

Output
4
Input
2
-+

Output
1
Input
5
++-++

Output
3


-----Note-----

In the first test, if Vasya had $3$ stones in the pile at the beginning, after making operations the number of stones will be equal to $0$. It is impossible to have less number of piles, so the answer is $0$. Please notice, that the number of stones at the beginning can't be less, than $3$, because in this case, Vasya won't be able to take a stone on some operation (the pile will be empty).

In the second test, if Vasya had $0$ stones in the pile at the beginning, after making operations the number of stones will be equal to $4$. It is impossible to have less number of piles because after making $4$ operations the number of stones in the pile increases on $4$ stones. So, the answer is $4$.

In the third test, if Vasya had $1$ stone in the pile at the beginning, after making operations the number of stones will be equal to $1$. It can be proved, that it is impossible to have less number of stones after making the operations.

In the fourth test, if Vasya had $0$ stones in the pile at the beginning, after making operations the number of stones will be equal to $3$.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
s = input()
b = 0
for i in s:
    if i == '+':
        b += 1
    else:
        b -= 1
        b = max(b, 0)
print(b)

def go():
    n = int(input())
    a = [i for i in input()]
    x = 0
    for i in a:
        if i == '-':
            x = max(0, x - 1)
        else:
            x += 1
    return x

print(go())


def main():
    from sys import stdin, stdout

    def read():
        return stdin.readline().rstrip('\n')

    def read_array(sep=None, maxsplit=-1):
        return read().split(sep, maxsplit)

    def read_int():
        return int(read())

    def read_int_array(sep=None, maxsplit=-1):
        return [int(a) for a in read_array(sep, maxsplit)]

    def write(*args, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in args) + end)

    def write_array(array, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in array) + end)

    n = read_int()
    s = read()
    stones = 0
    for c in s:
        if c == '+':
            stones += 1
        else:
            stones -= 1
            if stones < 0:
                stones = 0
    write(stones)

main()


n=int(input())
s=input()
cur=0
for a in s:
    cur=max(cur,0)
    if(a=='-'):
        cur-=1
    else: cur+=1
    cur=max(cur,0)
print(cur)

n = int(input())
x = input()
cur = 0
for c in x:
    if c == '-':
        while cur <= 0:
            cur += 1
        cur -= 1
    else:
        cur += 1
print(cur)

n=int(input())
s=input()
ans=0
for i in s:
    if(i=='+'):
        ans+=1
    else:
        ans-=1
    if(ans<0):
        ans=0
print(ans)

n = int(input())
s = input()
ans = 10000
for i in range(0, 105):
	f = True
	x = i
	for c in s:
		if c == '-':
			x -= 1
		else:
			x += 1
		if x < 0:
			f = False
	if f:
		ans = min(ans, x)
print(ans)


n = int(input())
s = input()
maxn = 0
now = 0
for i in s:
    if i == '+':
        now += 1
    else:
        now -= 1
    maxn = max(maxn, -now)
print(now + maxn)

n = int(input())
s = input()
t = 0
for i in s:
    if i == '+':
        t += 1
    else:
        t = max(t - 1, 0)

print(max(t, 0))


n = int(input())
s = input()
t = 0
mn = 0
for i in s:
    if i == '-':
        t-=1
    else:
        t+=1
    mn = min(mn, t)
print(-mn+t)

n = int(input())
ops = input().strip()
begin = 0 
for op in ops:
    if op == '-':
        begin -= 1
    elif op == '+':
        begin += 1
    
    begin = max(begin, 0)

print(begin)

def main():
    n = int(input())
    s = input()
    mi = 0
    c = 0
    for i in s:
        if i == '+':
            c += 1
        else:
            c -= 1
        mi = min(mi, c)
    print(c - mi)
    return 0
main()

n = int(input())
s = input()
c = 0

for i in s:
    if c == 0 and i == '-':
        pass
    elif i == '+':
        c += 1
    else:
        c -= 1
print(c)


n = int(input())

ops = input()

resp = 0

for op in ops:
    if op == "-":
        resp = max(0, resp - 1)
    else:
        resp += 1
print(resp)


n = int(input())
l = input()
s = 0
for c in l:
    if c == '+':
        s += 1
    else:
        s -= 1
        if s < 0:
            s = 0

print( s )

N = int(input())
operations = input()

res = 0
for c in operations:
    if c == '-':
        res = max(0, res-1)
    else:
        res += 1

print(res)

N = int(input())
s = input()
ans = 0
for i in range(N):
    if s[i] == "-":
        ans -= 1
    else:
        ans += 1
    if ans < 0:
        ans = 0
print(ans)


n = int(input())
ops = input()
curr = 0
ans = 0
for op in ops:
    curr += -1 if op == '-' else 1
    ans = max(ans, -curr)
for op in ops:
    ans += -1 if op == '-' else 1
print(ans)

n = int(input())
s = input()
start = 0
for x in s:
    if x == '-':
        start = max(0, start - 1)
    else:
        start += 1
print(start)


x = 10**9+7
N = int(input())
S = input()
mini = x

for s in S:
    if s == '+':
        x += 1
    else:
        x -= 1
    mini = min(mini, x)
print(x - mini)

n=int(input())
s=input()
ans=0
for c in s:
    if c=='+':
        ans+=1
    else :
        if ans>0:
            ans-=1
print(ans)

n = int(input())
a = input()
balance, min1 = 0, 0
for q in a:
    if q == '+':
        balance += 1
    else:
        balance -= 1
    min1 = min(min1, balance)
print(balance-min1)


from sys import stdin
n=int(stdin.readline().strip())
#n,m=map(int,stdin.readline().strip().split())
s=stdin.readline().strip()
ans=101;
for i in range(0,101):
    x=i
    for j in range(n):
        if s[j]=="-":
            x-=1
        else:
            x+=1
        if x<0:
            x=101
            break
    ans=min(x,ans)
print(ans)
    


def read_nums():
    return [int(x) for x in input().split()]


def main():
    n, = read_nums()
    s = input()
    count = 0
    for ch in s:
        if ch == '+':
            count += 1
        else:
            count = max(count - 1, 0)
    print(count)


def __starting_point():
    main()

__starting_point()

n = int(input())
ops = input()
c = 0
for o in ops:
    if o == '-':
        c = c - 1 if c > 0 else 0
    else:
        c += 1
print(c)