Andres Iniesta

No attempts yetTime limit1sMemory limit128 MB

Problem

Midfielder Andres Iniesta trains on an N×MN \times M grid where some cells hold obstacles. He stands on an empty cell and sees every cell in the same row or column with no obstacle between them, including his own cell.

Iniesta can destroy obstacles with a ball, at most KK times. After destroying obstacles, find the maximum number of cells he can see from some empty cell. He may stand on a cell that was empty initially or on a cell whose obstacle he destroyed.

Input

The first line contains NN, MM, and KK: the number of rows, columns, and the maximum obstacles he may destroy.

Each of the next NN lines has MM characters: . for an empty cell and * for an obstacle.

Output

Print one integer: the maximum number of visible cells after destroying up to KK obstacles and standing on an empty cell.

Constraints

  • 1N,M2001 \le N, M \le 200
  • 0K500 \le K \le 50

Hint

Only obstacles on Iniesta's row and column affect his view from a chosen cell. For each candidate cell, try destroying up to KK obstacles on that row and column and count visible cells.