#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, t;
  string s;
  bool can = false;
  cin >> n >> s;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '#') {
      can = true;
      t = i;
      break;
    }
  }
  int ans = 0;
  if (can) {
    for (int i = t; i < n; i++) {
      if (s[i] == '.') ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
