line=gets.chomp
l=line.length-1
a=[0]
b=[0]
c=0
m=0
n=0
for i in 0..l
  if line[i]=="<" then
    m=m+1
  else
    m=0
  end
  a.push(m)
end
for j in 0..l
  if line[l-j]==">" then
    n=n+1
  else
    n=0
  end
  b.push(n)
end
b.reverse!
for k in 0..a.length-1
  c=c+[a[k],b[k]].max
end
puts c