Fibonacci Strings

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Aron likes Fibonacci numbers. He likes them so much he actually got bored of the numbers themselves and decided to invent other combinatorial objects based on them instead.

His first invention is the Fibonacci string. We call a string consisting of only letters aa and bb, with exactly nn letters aa without any two consecutive letters aa a Fibonacci string of the nn:th order.

Given a string XX of aa:s and bb:s, compute the sum of orders of all Fibonacci strings that are substrings of XX. Note that if a string XX appears multiple times, its order should be counted once for every occurance.

입력

The sample judge reads input in the following format:

  • line 11: N
  • line 22: X

출력

The judge writes a single line containing the return value of fibonacci(N, X).

제한

  • 1N100,0001 \le N \le 100\\,000