#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, -1, -1, 1, 1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(10);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  string s;
  cin >> n >> s;
  int Hash = n + 1, ans = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      Hash = i;
      break;
    }
  }
  for (int i = Hash; i < n; i++) {
    if (s[i] == '.') ans++;
  }
  cout << ans << endl;
  return 0;
}
