import std.stdio;void main(){foreach(ubyte[]s;chunks(stdin,454)){int n;foreach(i,c;s[42..$])c&s[i+2]&s[i]^42||n++;writeln(n);}}