There was a magic necklace. The necklace is made of magical gems numbered 1 through n. Unfortunately, the necklace was accidentally broken yesterday. Every gem was scattered on the ground. Now you need to restring the magic necklace with these n gems. In order to keep the necklace magical, adjacent numbered gems cannot be placed next to each other in the new necklace. Please output the number of ways to successfully restring the necklace. If the relative positions of thegems arethe same, we think thesearethe same case.
There was a magic necklace. The necklace is made of magical gems numbered 1 through n. Unfortunately, the necklace was accidentally broken yesterday. Every gem was scattered on the ground. Now you need to restring the magic necklace with these n gems. In order to keep the necklace magical, adjacent numbered gems cannot be placed next to each other in the new necklace. Please output the number of ways to successfully restring the necklace. If the relative positions of the gems are the same, we think these are the same case.