#include <bits/stdc++.h>
using namespace std;
int n, cnt1 = 1, cnt2, cnt3, cnt[200005], f, t;
string s;
int main() {
  cin >> n >> s;
  if (s[0] == '.') f = 1;
  for (int i = 0; i < n; i++) {
    if (i == n) {
      cnt[t] = cnt1;
      break;
    }
    if (s[i] == s[i + 1])
      cnt1++;
    else {
      cnt[t] = cnt1;
      t++;
      cnt1 = 1;
    }
  }
  cout << cnt[0] << cnt[1] << cnt[2] << endl;
  if (f) {
    for (int i = 1; cnt[i + 1] != 0; i += 2) {
      cnt2 += cnt[i];
      cnt3 += cnt[i + 1];
    }
    cout << (cnt2 >= cnt3 ? cnt3 : cnt2) << endl;
    return 0;
  } else {
    for (int i = 0; cnt[i + 1] != 0; i += 2) {
      cnt2 += cnt[i];
      cnt3 += cnt[i + 1];
    }
    cout << cnt2 << cnt3 << endl;
    cout << (cnt2 >= cnt3 ? cnt3 : cnt2) << endl;
    return 0;
  }
}
