Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
299 B
4
Indexable
Never
#include <stdio.h>

int main()
{
    int i, N;
    int L = 0, R = 0;
    char c;

    scanf("%d\n", &N);
    for (i = 0; i < N; i++) {
        c = getchar();
        if (c == 'L')
            L++;
        else
            R++;
    }
    printf("%d\n", L + R + 1);
    return 0;
}