#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s;
  cin >> n >> s;
  int c = 0, f = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '#') f = 1;
    if (s[i] == '.' && f) c++;
  }
  cout << c << "\n";
  return 0;
}
