PLUSEVI  How Many Plusses
Mirko is a strange boy so he has written down a square matrix full of ones and zeroes. Now he is interested in how many plusses there are in his matrix.
A plus is a square such that its side has an odd length greater than 1 and all of its cells are zero, except for the middle row and the middle column: they must be full of ones. For example, in the matrix below there are two plusses, one inside the other:
00100
00100
11111
00100
00100
Input
In the first line there is an integer N ≤ 2000, dimenzion of the square matrix.
The next N lines are the rows of the matrix.
Output
Print the number of plusses appearing in the matrix.
Example
Input: 8
00010000
00010000
00010000
11111111
00010000
00010010
00010111
00010010
Output: 3
hide comments
Vipul Srivastava:
20160912 06:05:41
Last edit: 20161201 15:48:34 

(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20121225 15:48:03
@Ehor Nechiporenko: No, that not true... Max matix size is 2000x2000. AC on first try with 2000x2000 static array... 

Ehor Nechiporenko:
20121224 15:23:01
Important!!! Seems like matrix size could be greater than 200!


Radhakrishnan Venkataramani:
20110914 09:33:35
Nice Problem !!!

Added by:  Adrian Satja Kurdija 
Date:  20110521 
Time limit:  0.765s4.595s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Croatian junior team selection test 2011 