#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
 
int main(){
    int n;
    cin>>n;
    string s;
    cin>>s;
    int po[n+1];
    s='#'+s;
    for(int i=1;i<=n;i++){
        po[i]=(s[i]=='R');
    }
    int cur=0;
    for(int i=1;i<=n;i++){
        if(cur%2==0){
            if(po[i]){
                cur++;
            }
            cur++;
        }
        else{
            if(!po[i]){
                cur++;
            }
            cur++;
        }
    }
    cout<<cur<<endl;
    return 0;
}

