Slice Notation

Slice notation is a notation that divides numbers into slices. The slices work with each other and make a bigger number. The whole operation is called a bread, and individual parts are called slices. It may look yummy, but don't eat the numbers!

Basic

 * 1) [A]=A, and []=1




 * [A|B]=A^B


 * [A|B|C]=A^(C)B


 * [A|B|C|...|X|Y|Z]=[A|B|C|...|X|[A|B|C|...|X|[... ... ... [A|B|C|...|X|Y]]...]] with B breads.
 * 1) If the last number is 0, exclude it.
 * 2) If the first number is 0, then the answer is 0 for [A] or 1 for everything else.