#include #include #define nmax 105 using namespace std; int n, m, dp[nmax][nmax]; string a[nmax]; int main() { cin>>n>>m; cin.get(); for(int i=0; i=0; i--) for(int j=m-1; j>=0; j--) { dp[i][j] = a[i][j] == '&'? 0 : max(dp[i+1][j], dp[i][j+1])+1; } cout<