s = gets.chomp.split("")
len = s.length
ans = 0
(len+1).times do |i|
  l_max = 0
  r_max = 0
  l = i-1
  while l >= 0
    if s[l] == "<"
      l_max += 1
    else
      break
    end
    l -= 1
  end
  r = i
  while r <= len-1
    if s[r] == ">"
      r_max += 1
    else
      break
    end
    r += 1
  end
  ans += [l_max,r_max].max
end
puts ans