#include <bits/stdc++.h>
using namespace std;
long long n;
void solve() {
  string a, b, c;
  cin >> a;
  long long i, ans1 = 0, ans2 = 0;
  for (i = 0; i < a.length(); i++) b.push_back('.');
  for (i = 0; i < a.length(); i++) c.push_back('#');
  for (i = 0; i < a.length(); i++)
    if (b[i] != a[i]) ans1++;
  for (i = 0; i < a.length(); i++)
    if (c[i] != a[i]) ans2++;
  cout << min(ans1, ans2) << endl;
}
int main() {
  while (cin >> n) solve();
  return 0;
}
