print([0,7,0,915,0,98][int(input())])