#include <iostream>
#include <string>
#include <cmath>
int findrCoin();
int findlCoin();
int main() {
int mapSize, s_counter = 0, allCollected = 0;
std::cin >> mapSize;
std::string mapPic;
std::cin >> mapPic;
int myPos = mapPic.find('R');
while (true) {
int lCoin = findlCoin(mapPic, myPos);
int rCoin = findrCoin(mapPic, myPos, mapSize);
if (lCoin == -1 && rCoin == -1) break;
if (lCoin == -1 || (rCoin != -1 && std::abs(rCoin - myPos) < std::abs(myPos - lCoin))) {
s_counter += std::abs(rCoin - myPos);
myPos = rCoin;
allCollected++;
mapPic[myPos] = '.';
} else {
s_counter += std::abs(myPos - lCoin);
myPos = lCoin;
allCollected++;
mapPic[myPos] = '.';
}
}
std::cout << s_counter << ' ' << allCollected << std::endl;
return 0;
}
int findlCoin(std::string& mapPic, int start) {
for (int i = start - 1; i >= 0; --i) {
if (mapPic[i] == '*') return i;
}
return -1;
}
int findrCoin(std::string& mapPic, int start, int mapSize) {
for (int i = start + 1; i < mapSize; ++i) {
if (mapPic[i] == '*') return i;
}
return -1;
}