Please help me in CHEFSIGN

,

What is error in my code?

https://www.codechef.com/viewsolution/14588443

For input

1

<<<><<

Your code generates output 5

But correct output is 4

1<2<3<4>1<2<3

Hint:Find the length of longest continuous sequence of ‘<’ or ‘>’ without ‘=’ sign