#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <string>
#include <limits>
using namespace std;
int main() {
int n;
cin >> n;
cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
string line;
getline(cin, line);
size_t robot = line.find('R');
//cout << line << "\n";
//cout << robot << "\n";
vector<int> offsets;
int pos = 0;
int robpos = 0;
for (char room : line) {
if (room == '*') {
offsets.push_back(pos - robot);
}
else if (room == 'R') {
//offsets.push_back(0);
robpos = offsets.size()-1;
}
pos++;
}
int totalscore = 0;
int steps = 0;
int roboff = 0;
while (offsets.size() > 0) {
/*cout << "\n";
for (int off : offsets) {
cout << off << " ";
}
cout << "\nstep:";*/
/*if (offsets.size() == 1) {
int left = offsets[robpos] - roboff;
offsets.erase(offsets.begin() + robpos);
robpos -= 1;
roboff += left;
steps += abs(left);
totalscore++;
break;
}*/
int left = offsets[robpos] - roboff;
int right = (robpos + 1 < offsets.size()) ? (offsets[robpos + 1] - roboff) : INT_MAX;
if (abs(left) > abs(right)) {
//cout << " right " << left << " " << right;
offsets.erase(offsets.begin()+robpos+1);
roboff += right;
steps += abs(right);
totalscore++;
}
else if (abs(right) > abs(left)){
//cout << " left " << left << " " << right;
offsets.erase(offsets.begin()+robpos);
robpos -= 1;
roboff += left;
steps += abs(left);
totalscore++;
}
else {
//cout << "same" << "\n";
break;
}
}
cout << steps << " " << totalscore << "\n";
return 0;
}