print([1051,10275,841341][int(input())-1])