** input L and initialize **
,----------[<[->++++++++++<]++++++[->------<]>-->,----------]
->>>++>>>+>>>-<+[-<+]-<
****
* memory layout: C*__p__q__p__q ~~ p__q__*
* C: counter ( initially L )
* p q: decimal digit ( low: left )
* *: sentinel ( minus 1 )
****
** main loop **
[+[---
** add p to q ( Q ) and expand a digit **
* C*____pQ____pQ ~~ _00_____*
>>>->+[-
[->>+>+<<<]>>>>>>
+]>>>>>>,+>>>-
** add carry to the next Q's digit ( with simple divmod ) and add q back to p ( P ) **
* C*____Pq____Pq ~~ _Pq____*
* pQ____pQ
* p__m__pQ'
* Pq____pQ' ( add m to p and also move m to q )
**
<+[-<+]>>->>+[-
>++++++++++<[->-[>+>]>[,+>>>>+<<]<<<<]
>,+>[-<<+<+>>>]>>>>
+]<-
** add carry to the next P's digit ( with simple divmod ) **
* C*__p__q__p__q ~~ p__q__*
<+[-<+]>+[-
<++++++++++>[-<-[<+<]<[,+>>>>>>>>+<<<<<<<<<<]>>>>]
<,+>>>>>>>
+]<<,
** shrink digit when the p's highest digit is zero **
<<<<<+<[>-]>[-<-<]
+[-<+]-<
<<]>>]
>+[-<+]-
** q: MP decrement **
>>>>>+[
>[-<-]
<[->+++++++++>>>>>+<]
>]
** search the Q's highest ( non zero ) digit **
+[->+]<<+<[>-]>[<<<<<]<+<+[->-]>[-<->>>>>>>>]<<
** print **
+[
<++++++[->++++++++<]>-.
<<<<<<+]