n=int(input()) ans=[7,15,23,28,31,39,47,55,60,63] print(ans[n-1])