Amazing balloon
题号:NC220693
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

The balloon is used to prove that you solve the problem in the competition.One day, the careless fishfloss accidentally released a balloon, the balloon was affected by the air flow floating in the air.Now he gives you a string containing only the letters 'u' and 'd', which represent the balloon going up and down  respectively.Assuming that the base distance up or down is 1. So let's figure out how far the balloon is moving.

输入描述:

One line,a string containing only letters 'u' and 'd'.
(0 < the string's length < 64 )

输出描述:

Output one line ,a number about the answer.
示例1

输入

复制
udud

输出

复制
0
示例2

输入

复制
uddudud

输出

复制
-1