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