s = gets.chomp
n = s.size
num = Array.new(n+1,0)


(n+1).times do |i|
    j = 1
    j += 1 while i - j >= 0 && s[i-j] == "<"
    j -= 1

    k = 0
    k += 1 while i + k < n && s[i+k] == ">"

    num[i] = j > k ? j : k
end

#p num
puts num.inject(:+)