#include <iostream>
#include <string>
#include <vector>
using namespace std;
int moveRight(const vector<char>& charPath, int robotPosition) {
for (int i = robotPosition + 1; i < charPath.size(); i++) {
if (charPath[i] == '*') {
return (i - robotPosition);
}
}
return INT_MAX;
}
int moveLeft(const vector<char>& charPath, int robotPosition) {
for (int i = robotPosition - 1; i >= 0; i--) {
if (charPath[i] == '*') {
return (robotPosition - i);
}
}
return INT_MAX;
}
int main() {
int room;
cin >> room;
string path;
cin >> path;
vector<char> charPath(path.begin(), path.end());
int robot_position = path.find('R');
int stepsTaken = 0;
int coinsCollected = 0;
while (true) {
int leftDist = moveLeft(charPath, robot_position);
int rightDist = moveRight(charPath, robot_position);
if (leftDist == rightDist) {
break;
} else if (leftDist < rightDist) {
charPath[robot_position] = '.';
robot_position -= leftDist;
charPath[robot_position] = 'R';
stepsTaken += leftDist;
coinsCollected += 1;
} else if (rightDist < leftDist) {
charPath[robot_position] = '.';
robot_position += rightDist;
charPath[robot_position] = 'R';
stepsTaken += rightDist;
coinsCollected += 1;
}
}
cout << stepsTaken << " " << coinsCollected << endl;
}