#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int cntw = 0;
  for (long long i = (0); i < (n); i++) {
    if (s[i] == '.') cntw++;
  }
  for (long long i = (0); i < (n); i++) {
    if (s[i] == '#') break;
    if (s[i] == '.') cntw--;
  }
  cout << cntw << endl;
  ;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
