Network#1763

Network

1 second
64 megabytes
Very easy

In your company's computer network, there are computers. Due to a malfunctioning switch, not all pairs of computers can communicate with each other. Additionally, if computer is exchanging information with computer , no other computers can communicate with either or during that time. Your task is to determine the maximum number of computers that can simultaneously participate in exchanging information.

Input

The first line contains the integer (1 \leq n \leq 18). Each of the next lines contains characters. The -th character of the -th line is "Y" if computers and can exchange information, and "N" otherwise. The -th character of the -th line is always "N", and the matrix is symmetric.

Output

Output the maximum number of computers that can simultaneously participate in exchanging information.

Examples

Example 1

Loading
Loading