#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  string S;
  cin >> N >> S;
  int left = 0;
  while (left < N) {
    if (S[left] == '#') break;
    ++left;
  }
  int res = 0;
  for (int i = left + 1; i < N; ++i) {
    res += (S[i] == '.');
  }
  cout << res << endl;
  return 0;
}
