#include <bits/stdc++.h>
using namespace std;
int i, n;
char s[1005];
int main() {
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> s[i];
  i = 1;
  while (s[i] == '.' && i <= n) ++i;
  cout << i << " ";
  while (s[i] == 'R') i++;
  if (s[i] == 'L')
    cout << i - 1;
  else
    cout << i;
  return 0;
}
