#include <algorithm>
#include <iostream>
#include <string>
int main() {
int n;
std::cin >> n;
std::string rooms;
std::cin >> rooms;
int robot;
for (int i = 0; i < rooms.length(); ++i) {
if (rooms[i] == 'R') robot = i;
}
int coins = 0;
int steps = 0;
bool done = false;
while (!done) {
int i = 1;
int lb = robot;
int ub = rooms.length()-robot-1;
int sign = (ub-lb)/std::abs(ub-lb);
int found = false;
for (; i <= std::min(lb, ub); ++i) {
if (rooms[robot-i] == '*') {
if (rooms[robot+i] == '*') {
done = true;
break;
} else {
rooms[robot] = '.';
robot -= i;
coins++;
steps += i;
found = true;
break;
}
} else if (rooms[robot+i] == '*') {
rooms[robot] = '.';
robot += i;
coins++;
steps += i;
found = true;
break;
}
}
if (done || found) continue;
for (;i <= std::max(lb, ub); ++i) {
if (rooms[robot+i*sign] == '*') {
rooms[robot] = '.';
robot += i*sign;
coins++;
steps += i;
found = true;
break;
}
}
if (!found) {
done = true;
}
}
std::cout << steps << " " << coins << "\n";