#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, cnt1 = 0, cnt2 = 0;
  char s[200001];
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> s[i];
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == '#') {
      for (int j = i + 1; j < n; ++j) {
        if (s[j] == '.') ++cnt1;
      }
      i = n;
    }
  }
  for (int i = 0; i < n; ++i) cin >> s[i];
  for (int i = n; i > 0; --i) {
    if (s[i] == '.') {
      for (int j = i - 1; j >= 0; --j) {
        if (s[j] == '#') ++cnt2;
      }
      i = 0;
    }
  }
  cout << min(cnt1, cnt2) << endl;
  return 0;
}
