描述:
A sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each digit 0 into the sequence 1 0 and each digit 1 into the sequence 0 1. So, after the first time step, the sequence 0 1 is obtained; after the second, the sequence 1 0 0 1, after the third, the sequence 0 1 1 0 1 0 0 1 and so on.
How many pairs of consequitive zeroes will appear in the sequence after n steps?
输入:
Every input line contains one natural number n (0 < n ≤1000).
输出:
For each input n print the number of consecutive zeroes pairs that will appear in the sequence after n steps.
由一位数字组成的序列,电脑首先写入数字1.在每个连续的时间步骤中,电脑会同时将每个数字0转为10,每个数字1转为01.那么,在第一个时间步骤后,获得序列01,接着获得序列1001,再然后为01101001,并以此类推.那么在n个时间步骤后,序列当中会有多少对约0呢?
输入:每个输入行有一个自然数n(0<n<1000).
输出:每个输出行为经过n个时间步骤后序列出现约0的对数.