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