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