2990 - [Ontak2010 ]Keyboard

输入

输出

样例

输入

3 3
ytr
hgf
dsa
.--
|||
|||

输出

2
Time Limit 1 second
Memory Limit 128 MB
Stats
上一题 下一题