m@main=getLine>>=print.sum.map(f.read).words.map(\c->if c=='.'then ' 'else c)>>m;f 0=0;f n=n`mod`2+f(n`div`2)