print(-4+int(input()[-1:])%2*8)