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