3
#.##include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;

int main() {
  int n;
  string s;
  cin >> n >> s;
  int ans = 0;
  for (int i = n - 2; i >= 0; i--) {
    if (s[i] == '#' && s[i + 1] == '.') ans++;
  }
  cout << ans << endl;
}