UOJ Logo 黑暗爆炸OJ

DARKBZOJ

#2990. [Ontak2010 ]Keyboard

Statistics 下载数据

Description

Input

Output

Sample Input

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

Sample Output

2

Hint

Source