
Given a sequence of squares on an 8 \times 8 chessboard, represented by consecutive coordinates of a queen in chess notation, determine how many distinct squares the queen visits during its journey.
A square is considered visited if it lies on any straight-line path of the queen's movement, even if it is not explicitly listed in the sequence.
The input consists of a single line containing the sequence of squares where the queen was positioned during her journey. The input data is guaranteed to be correct.
Output a single number representing the total number of distinct squares visited by the queen.
Example 1