Use 9 numbers from 1 to 9 to form a nine-digit number without repeating numbers, and meet the following requirements: the number on each digit is either greater than or smaller than all the numbers before it. Question: How many such nine-digit numbers are there?
用1至9这9个数字组成一个没有重复数字的九位数，满足以下要求：每一位上的数字要么大于它前面的所有数字，要么小于它前面的所有数字．请问：这样的九位数共有多少个？
<gadget id="calculator">2 * 2 * 2</gadget>
<output>8</output>

<gadget id="calculator">2 ** 8</gadget>
<output>256</output>

<result>256</result>