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