| ||Fox Ciel wants to type a word on her old cell phone. The cell phone has only one button. The letter A is typed by tapping the button once, B by tapping it twice in a row, and so on, in alphabetical order. Thus, the last letter Z is typed by tapping the button 26 times without a pause.
You are given a String word. Compute and return the answer to the following question: How many times will Ciel tap the button while typing this word?
|Method signature:||int write(String word)|
|(be sure your method is public)|
|-||While typing a word, Ciel has to make a short pause after typing each letter, so that the phone can tell when one letter ends and another letter begins. These pauses do not matter in this problem.|
|-||word will contain between 1 and 50 characters, inclusive.|
|-||Each character in word will be an uppercase English letter ('A'-'Z').|
|One tap types the letter A.|
|To type ABC, Ciel will do the following:
The total number of taps is 1+2+3 = 6.
- Tap the button once to type A.
- Tap the button twice to type B.
- Tap the button three times to type C.
This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2010, TopCoder, Inc. All rights reserved.