#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int cnt = 0;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#')
      cnt++;
    else {
      ans = max(ans, cnt);
      cnt = 0;
    }
  }
  cout << ans << endl;
}
