print+(4,2,8,5,7,1)[<>%7]