
You are given a valid postponed chess position in which the endgame consists of a white knight and pawn against a black knight. As always, it is White's turn to move.
Your task is to determine the number of possible moves that the white knight can make. The possible moves, according to standard chess rules, are shown as red points in the figure.
The first line contains the positions of the white pieces, and the second line contains the positions of the black pieces, separated by spaces. The symbols for the pieces are described in the note below.
Output a single integer — the number of possible moves for the white knight.
Example 1