#include <bits/stdc++.h>
using namespace std;
const int INF = 10000000;
int main(int argc, char *argv[]) {
  int N;
  string S;
  cin >> N;
  cin >> S;
  int ans = 0;
  int i = 0;
  for (; i < N; i++) {
    if (S[i] == '#') break;
  }
  for (; i < N; i++) {
    if (S[i] == '.') ans++;
  }
  cout << ans << endl;
  return 0;
}
