#K8306. Knight's Attack Positions
Knight's Attack Positions
Knight's Attack Positions
Given a valid chessboard position, determine the number of valid positions from which a knight can attack that square. The knight moves in an L-shape, defined by the offsets \( (\pm2,\pm1) \) and \( (\pm1,\pm2) \). Only positions within a standard 8×8 board are considered valid.
inputFormat
The input consists of a single line containing a string that represents a valid chessboard position (for example, "e4").
outputFormat
Output an integer representing the number of valid positions from which a knight can attack the given square.
## samplee4
8