#5550. All Letter Subgrid Count I

0

All Letter Subgrid Count I

All Letter Subgrid Count I

You are given a grid of letters. Your task is to calculate the number of square subgrids that contain all the letters.

Input

The first line has two integers n and k: the size of the grid and the number of letters. The letters are the first k uppercase letters. After this, there are n lines that describe the grid. Each line has n letters.

Output

Print the number of subgrids.

Constraints

1n30001 \le n \le 3000

1k261 \le k \le 26

Example

Input

5 3
ABBBC
BBBBC
BCAAA
AAAAA
AAAAA

Output

15