n = gets.to_i puts [-114514,7,7,6,6,5,6,7,1,2,3][n]