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