Problem Statement
You are given a string
SS that is a permutation of atcoder.
On this string
SS, you will perform the following operation
00 or more times:
-
Choose two adjacent characters of SS and swap them.
Find the minimum number of operations required to make
SS equal atcoder.
Constraints
-
SS is a string that is a permutation of atcoder
Input
Input is given from Standard Input in the following format:
SS
Output
Print the answer as an integer.