eolymp
bolt
Try our new interface for solving problems
Problems

Mumatrix

Mumatrix

Time limit 2 seconds
Memory limit 256 MiB

The binary matrix is given. Find its square modulo 2.

Input data

The first line contains the size of the matrix n (1n4000). Each of the next n lines contains n symbols, equal to 0 or 1.

Output data

Print one number - the amount of ones in a square matrix.

Examples

Input example #1
3
011
100
101
Output example #1
5
Author Sergey Kopeliovich