#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int ans = 0;
  int black = -1;
  for (int i = 0; i < (n); ++i) {
    if (s.at(i) == '#') {
      black = i;
      break;
    }
  }
  for (int i = black; i < n; ++i) {
    if (s.at(i) == '.') ans++;
  }
  cout << ans << endl;
  return 0;
}
