#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a;
  cin >> n >> a;
  int cnt = 0;
  for (int i = 0; i <= n - 2; i++) {
    if (a[i] == '#') {
      cnt++;
    }
  }
  if (cnt == 0)
    cout << 0 << endl;
  else if (a[n - 1] == '#')
    cout << n - cnt - 1 << endl;
  else
    cout << n - cnt << endl;
  return 0;
}
