fork(1) download
  1. # http://c...content-available-to-author-only...e.com/a/85414/34718
  2.  
  3. L=[1]
  4. n=input()
  5. while n:L+=[2*L[0]+1,3*L[0]-1];n-=1;L=sorted(set(L))[1:]
  6. print L[0]
Success #stdin #stdout 0.01s 8976KB
stdin
54
stdout
255