Company: Nagarro_13thjuly
Difficulty: medium
How to Attempt? Magical Pathway Puzzle Ella is exploring a magical forest filled with glowing stones arranged in a line. These stones are numbered from 1 to N, with the first stone at position 1 and the last at position N. Ella starts outside the forest, just before the first stone. She can step forward to either the next stone or skip a stone to land two stones ahead. However, some stones are cursed and cannot be stepped on. If Ella steps on a cursed stone, she will be teleported back to the start. Your task is to help Ella find and return an integer value representing the number of ways she can safely reach the N th stone without stepping on any cursed stones. If there is no possible way to reach the last stone, return 0. Note: The answer may be large, so return the answer modulo 10e9 + 7 . The array follows 1-based indexing. Input Specification: input1 : An integer value N, representing the total number of stones.