An integer N (2 ≤ N ≤ 10^5), representing some quantity or size.
A string S of length N, consisting of the characters 'L' and 'R'. The first character of S is 'R' and the last character is 'L'.

### Example Input:

```
5
RRLRL
```

### Function Signature:
Write a function f(N, S) that takes in the input.
```python
def f(N: int, S: str):
    ''' 
    N: an integer 
    S: a string
    '''
```