ns = [2,8,5,7,1,4] main = readLn >>= print . (ns !!) . flip mod 6 . pred