#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int count_front = 0;
  int count_back = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '.') {
      count_front += 1;
    }
    if (S[i] == '#') {
      count_back += 1;
    }
  }
  if (count_front > count_back) {
    cout << count_back << endl;
  } else {
    cout << count_front << endl;
  }
  return 0;
}
