#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int firstblack = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '#') {
      firstblack = i;
      break;
    }
  int ans = 0;
  for (int i = firstblack + 1; i < n; i++) ans += (s[i] == '.');
  cout << ans << endl;
}
