RunUnfortunately XORin's spell wasn't powerful enough and now he has to run from his evil enemies. He finds himself in the upper left corner of a rectangular grid of size NxM. Some cells are inaccessible. XORin doesn't know how to run up or left so he has to find the longest path so that he runs only down and right and he passes only through empty cells.
InputOn the first line of the input there will be the numbers N and M representing the size of the grid.
On the next N lines will be M characters representing the structure of the grid. The character . represents an empty cell and & represents an inaccessible cell.
OutputPrint the maximum number of cells XORin can visit.
Constraints1 ≤ N, M ≤ 100