N=10000
The count=n - 1
Result="2"
For I in range (0, count) :
Num=result
Result=""
K1=0 # before carry 1
K2=0 # carry current
For j in range (0, len (num) :
If ((int (num [j]) * 2 + k2) & gt;=10) :
K1=1 # carry 1
Result=result + STR ((int (num [j]) * 2 + k2) % 10)
K2=k1
K1=0
If k2==1:
Result=result + STR (k2)
If the count==0:
Result="1"
Result=the result] [: : - 1
Print (result)