#include <bits/stdc++.h>
using namespace std;
int main() {
  int length;
  cin >> length;
  string message;
  cin >> message;
  int ans = 0;
  int firstTarget = message.find_first_of("#");
  if (firstTarget >= 0) {
    for (int i = firstTarget; i < (int)message.length(); i++) {
      if (message.substr(i, 1) == ".") {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
