n = int(input())

k = input()
p = 0
r_count = 0
b_count = 0
for l in range(n):
    if str(k[p]) == "R":
        r_count += 1
        p += 1
    elif str(k[p]) == "B":
        b_count += 1
        p += 1
    else:
        pass
print(r_count,b_count)
