An integer N (1 ≤ N ≤ 10^5), representing some quantity or size.
An integer K (1 ≤ K ≤ 10^5), representing another quantity or size.
A string S of length N, consisting solely of characters 'L' and 'R'.

### Example Input:

```
6 1
LRLRRL
```

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