#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = (ll)1e9 + 7;
const ll LL_MAX = 0x7fffffffffffffff;
int main() {
  ll n;
  string s;
  cin >> n;
  cin >> s;
  ll count = 0;
  bool flag = false;
  for (ll i = 0; i < n; i++) {
    if (flag) {
      if (s[i] == '.') {
        count++;
      }
    } else {
      if (s[i] == '#') {
        flag = true;
      }
    }
  }
  cout << count;
  return 0;
}
