#include <bits/stdc++.h>
using namespace std;
signed main() {
  int N;
  string S;
  cin >> N >> S;
  int count = 0;
  int i;
  for (i = 1; i < N; i++)
    if (S[i - 1] == '#' && S[i] == '.') break;
  for (; i < N; i++)
    if (S[i] == '.') count++;
  cout << count << endl;
  return 0;
}
