#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  long n;
  string s;
  cin >> n;
  cin >> s;
  long minsharp = n;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      minsharp = i;
      break;
    }
  }
  long ans = 0;
  for (int i = minsharp; i < n; i++) {
    if (s[i] != '#') ans++;
  }
  cout << ans << endl;
  return 0;
}
