function MainC(input) {
	input = input.split("\n");
	var n = input[0];
  var s = input[1];
  var tester = "";  
  var min = Infinity;
  
  for(var i = 0; i < n; i++){
    tester += "#";
  }
  
  function compare(a,b,n){
    var counter = 0;
    for(var i = 0; i < n; i++){
      if(a[i] != b[i]) counter += 1;
    }
    return counter;
  }
  
  var j = 0;
  while(j != n){
    var diff = compare(tester,s,n);
    if(diff < min) min = diff;
    t = tester.split("");
    t[j] = ".";
    tester = t.join("");
    j++;
  }
      
	console.log('%d',min);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
MainC(require("fs").readFileSync("/dev/stdin", "utf8"));