p01831 Line Gimmick
Example

Input

7
>>


Output

7
```python
import re
n = int(input())
s = input()
res = 10**10
res = min(res, len(re.search(r'^<*', s).group()))
res = min(res, len(re.search(r'>*$', s).group()))
print(n-res)


```