N=input()
x=int(N[1])
y=int(ord(N[0]))-int(ord('a'))+1
dx=[-2, -2, -1, -1, 1, 1, 2, 2]
dy=[1, -1, 2, -2, 2, -2, 1, -1]
cnt=0
for k in range(8):
nx=x+dx[k]
ny=y+dy[k]
if 1<=nx<=8 and 1<=ny<=8:
cnt+=1
print(cnt)'이코테' 카테고리의 다른 글
| 12)럭키스트레이트 (0) | 2021.12.02 |
|---|---|
| 12)게임 개발 (0) | 2021.12.02 |
| 10)상하좌우 (0) | 2021.12.02 |
| 9)만들 수 없는 금액 (0) | 2021.12.01 |
| 8)무지의 먹방 라이브 (0) | 2021.12.01 |