#agc040a. [agc040_a]><
[agc040_a]><
Problem Statement
Given is a string of length . Each character in is <
or >
.
A sequence of non-negative integers, , is said to be good when the following condition is satisfied for all ():
- If
<
: - If
>
:
Find the minimum possible sum of the elements of a good sequence of non-negative integers.
Constraints
- is a string of length consisting of
<
and>
.
Input
Input is given from Standard Input in the following format:
Output
Find the minimum possible sum of the elements of a good sequence of non-negative integers.
Sample Input 1
<>>
Sample Output 1
3
is a good sequence whose sum is . There is no good sequence whose sum is less than .
Sample Input 2
<>>><<><<<<<>>><
Sample Output 2
28