Death moon never lack of funny storys, because he is fond of collect them. To get more inspiration, he went to the gate of a pub and kept a careful record of all visitors. Each time a visitor entered the pub, death moon put down character "+" in his notes. Similarly, each time a visitor left the pub, he put character "-" in his notes. Death moon doesn't remember whether there was somebody in the pub at the moment when his shift begun and at the moment when it ended. Now he wonders what minimum number of distinct people he could have seen. Assume that he sees anybody coming in or out of the pub. Each person could have come in or out an arbitrary number of times.
The only line of the input contains a sequence of characters "+" and "-". The characters are written in the order, in which the corresponding events occurred. The given sequence has length from 1 to 300 characters, inclusive.
Print the minimum number of people that death moon could see
For the first case, if there is only one people come in and go out, well, that's the mininum number of
people. For the second case, three "go out", so we need at least three people to finish it.