#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s = 1, t = 1, b = 0;
  char c;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c == '.') {
      if (b == 1) break;
      t++;
    } else if (c == 'R') {
      t++;
      b = 1;
    } else
      break;
  }
  s = t - 1;
  if (b == 0) {
    t--;
    s++;
  }
  cout << s << ' ' << t << endl;
  return 0;
}
