#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, A, mode;
  char S;
  while (cin >> S) {
    if (mode == 0) {
      if (S == '#') {
        mode++;
      }
    } else {
      if (S == '.') {
        A++;
      }
    }
  }
  cout << A << endl;
}
