Task

Take a   Natural Number   in a given base and return the sum of its digits:

   110         sums to   1
   123410   sums to   10
   fe16       sums to   29
   f0e16     sums to   29


П0	<->	П1	Сx	П2	ИП1	^	ИП0	/	[x]
П3	ИП0	*	-	ИП2	+	П2	ИП3	П1	x=0
05	ИП2	С/П