line = gets.chomp
l = line.length
a = 0
for i in 0..l
  m = 0
  n = 0
  for j in i..l
    if line[j]==">" then
      m = m + 1
    else
      break
    end
  end
  for k in 1..i
    if line[i-k]=="<" then
      n = n + 1
    else
      break
    end
  end
  a = a + [m,n].max
end
puts a