[Question]
  [
Let's have a list of positive integers
```
[6,1,9,3,7,4,6,3,2,7,6,6]
```
this will represent a river. We would like to skip a stone across this river. We can throw the stone as far as we want and whatever number it lands on it will skip that many places. So if we start by throwing it 2 spaces, it will land on the `1` skip forward one place, land on the `9` skip forward 9 places, land on the final 6 and skip out of the river.
```
[6,1,9,3,7,4,6,3,2,7,6,6]
   ^
[6,1,9,3,7,4,6,3,2,7,6,6]
     ^
[6,1,9,3,7,4,6,3,2,7,6,6]
                       ^
```
The question for us is: "How do we throw the stone so it skips the largest number of times?" In the above case `2` skips 3 times and indeed we can see that this is the optimum.
Here's all the ways to throw the stone with the number of skips labeled:
```
[6,1,9,3,7,4,6,3,2,7,6,6]
 2 3 2 2 2 2 1 2 2 1 1 1
```
## Task
Given a list of positive integers as input output the maximum skips that can be achieved on that river.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the goal is to make your source code as small as possible as measured in bytes.
## Test cases
```
[1] -> 1
[1,1,1] -> 3
[9,1,1,1] -> 3
[9,3,1,2,2,9,1,1,1] -> 5
[6,6] -> 1
[6,1,9,3,7,4,6,3,2,7,6,6] -> 3
[1,1,9,1,1] -> 3
```
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 11 bytes
```
.sŒµ.Œì¬¨.$]Œ∂g
```
[Try it online!](https://tio.run/##yy9OTMpM/f9fr/jcVr1zkw@t0VOJPbct/f//aEsdYx1DHSMgtATSQBgLAA "05AB1E ‚Äì Try It Online") or [Try all cases!](https://tio.run/##yy9OTMpM/X9uq9J/veJzW/XOTT60Rk8l9ty29P9KemH/o6MNY3WiDXWAEEhb6iBYxkCWERAixMx0zMCkoQ5I1lzHRMcMSBsBWSCZWAA)
```
.sŒµ       # map over the suffixes of the list
   .Œì     #   iterate until reaching a fixed point, collecting intermediate results:
     ¬¨.$  #     get the first value, and drop that many values from the front
Œ∂         # after the map: transpose, padding with spaces
 g        # get the length
```
[Answer]
# JavaScript (ES6), 49 bytes
```
a=>Math.max(...a.map(g=(v,i)=>v&&-~g(a[i+=v],i)))
```
[Try it online!](https://tio.run/##dY5BDoIwEEX3noIVaWMpKWiNi3IDT0BYTBBqDVIipHHl1etgXNUys5jJ5P0//w4O5vZppiUb7bXzvfKgqgssN/6AF@GcAy4T0Yo4ZqiqXJpmb02gNnvlGjxR6ls7znbo@GA16UktGkqTeOV5InYhzrDjEsTLED@zTUEcLxEvsP@EiB9DXDK5lT6WXaLj@uHEDkziLHD7WcTCiC8eTb/i/gM "JavaScript (Node.js) ‚Äì Try It Online")
We turn the input array into a list of number of skips for each starting point, using the recursive callback function `g`:
```
g = (          // g is a recursive function taking:
  v,           //   v = value at the current position
  i            //   i = current position
) =>           //
  v &&         // abort if v is undefined
  -~g(         // otherwise increment the result of a recursive call:
    a[i += v], //   add v to i and pass a[i] as the new value
    i          //   pass the new position
  )            // end of recursive call
```
We then return the maximum of this list.
[Answer]
# [J](http://jsoftware.com/), 25 bytes
```
[:#[:+./ .*^:a:~#\=/~]+#\
```
[Try it online!](https://tio.run/##XU3BCoJAEL3vVwx6UHMdTctww1iKgiA6dF23EFGkhA52i/x1Gwsh4jHMvHkz7117A60KUgEWcAhAUHkIm9Nh1ythKuGiDzg5i1x0Zpb6nXbNrHfYcY1Q1GVxg7xp4FG2DyjytmxZWdR3sO1KGihfQr5QPrGDFNTAsYtc7VCUtwJrj3KL2lniJdQUHDA11YMwpYETPiRiKuF/NCIaEn6FOVMxj8f/mPbD3YLPeEw9pGmUo6998uPp9G8 "J ‚Äì Try It Online")
We think of it as a graph problem.
Consider `1 1 9 1 1`
* `]+#\` Add `1 2 3 4 5` to the input:
```
2 3 12 5 6
```
* `#\=/` Create an equality table showing where that is equal to `1 2 3 4 5`:
```
    1 2 3 4 5
  +----------
 2| 0 1 0 0 0
 3| 0 0 1 0 0
12| 0 0 0 0 0
 5| 0 0 0 0 1
 6| 0 0 0 0 0
```
This is the adjacency of matrix of the directed graph showing connections between the indices.
* `[:+./ .*^:a:~` "OR" matrix multiply that graph with itself until we reach a fixed point, saving intermediate steps:
```
0 1 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
```
* `[:#` Return the length, which is also the length of the longest path:
```
3
```
## [J](http://jsoftware.com/), Bonus port of [ovs's answer](https://codegolf.stackexchange.com/a/241595/15469), 25 bytes
```
[:>./<:@#@(({.}.])^:a:)\.
```
[Try it online!](https://tio.run/##XU3BCoJAEL3vVwx20KV1UrcMt5SlKAiiQ9fNQsSICjrYTfTXbSwEiWGY9@bNvHdvLbSvECuwQYAHitpFWB/329aoBCdLpUfacSqsMeVnlSl@wpazwwohvxX5A7LnE95F@YY8K4uSsSK/vcBxrtpCXStdo66wgRhMx7GR45RTlpuAvUO9IdMFXoKUkj1m/LQTfAKC6kskM5H4o5JoQDUUZsyEIuz/Q9p3d3MxFSHNgFAvy599NPDk7Qc "J ‚Äì Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `G`, ~~20~~ 16 bytes
```
≈º∆õ{D?L<|?i+1$}!‚á©
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJHIiwiIiwixbzGm3tEP0w8fD9pKzEkfSHih6kiLCIiLCJbNiwxLDksMyw3LDQsNiwzLDIsNyw2LDZdIl0=)
~~This feels too long~~ That's better.
## Explained
```
≈º∆õ{D?L<|?i+1$}!‚á©
≈º                 # The range [1, len(input)] - this represents all possible starting throw lengths
 ∆õ                # over each item N in that range:
  {D?L<|          #   while the top of the stack (the position of the rock on the lake) (initially N) is less than the length of the input: - this keeps the top of the stack on the stack
        ?i+       #     index into the input list at the current position of the rock and add the skip value to the position of the rock. This is what keeps track of how far the rock has travelled.
           1$     #     and push a 1 to the stack, placing it underneath the position of the rock - this keeps track of how many jumps have been made.
             }    #    end loop
              !‚á©  #    push the length of the stack minus 2 - this is the number of jumps made accounting for the remaining rock positions.
                  # the -G flag returns the maximum number of jumps from the resulting list.
```
[Answer]
# [Python 3](https://docs.python.org/3/), 61 57 54 53 bytes
-4 bytes thanks to @ovs
Further -3 bytes thanks to @xnor
And an additional -1 byte thanks to @ovs
```
f=lambda l,b=1:l>[]and max(1+f(l[l[0]:],-1),f(l[b:]))
```
[Try it online!](https://tio.run/##XYzBasMwEETv@oolJ4muTRQnLjHYPyJ0kLFNF9aSsERpvt6VU0JLmcPu29mZ@MgfwTf7vvTs1nFywDj2uuPBWOcnWN2X1G@LZMPmbDuLlVZ44NhZpXZaY9gypEcSYgkbMJA/qE55Il9vs5uY/Jyk6gQQhn51Uc6fjpHrFJmyPFXDSSkBcSOfJZVuUhjUbrSFagAtjMaiJzTC3PEfNgUvRX@NmzAttq98W@7H3ztesS3zUraX3fzU3387vwE "Python 3 ‚Äì Try It Online")
[Answer]
# x86-16 machine code, 24 bytes
```
00000000: 33c0 33db 5399 4202 183b d97e f93b d07c  3‚îî3‚ñàS√ñB‚òª‚Üë;‚îò~‚àô;‚ï®|
00000010: 028b c25b 43e2 edc3                      ‚òª√Ø‚î¨[CŒìœÜ‚îú
```
Listing:
```
33 C0       XOR  AX, AX                 ; AX = max skip count  
33 DB       XOR  BX, BX                 ; BX = starting point offset
        THROW_LOOP: 
53          PUSH BX                     ; save starting point 
99          CWD                         ; clear skips counter for this throw (DX = 0)
        SKIP_LOOP: 
42          INC  DX                     ; increment skip counter 
02 18       ADD  BL, BYTE PTR[BX+SI]    ; add it's value to place offset 
3B D9       CMP  BX, CX                 ; did it skip out of the river? 
7E F9       JLE  SKIP_LOOP              ; if not, let it keep skipping 
        END_SKIP: 
3B D0       CMP  DX, AX                 ; is skip counter higher than best? 
7C 02       JL   NOT_BEST               ; if not, try next starting offset 
8B C2       MOV  AX, DX                 ; if so, save as current best score 
        NOT_BEST: 
5B          POP  BX                     ; restore starting point 
43          INC  BX                     ; go to next starting point
E2 ED       LOOP THROW_LOOP             ; loop until end of array 
C3          RET
```
Input array at `[SI]`, length in `CX`. Output most skips in `AX`.
Tests with DOS DEBUG (in Dark Mode):
[![enter image description here](https://i.stack.imgur.com/Hh3RX.png)](https://i.stack.imgur.com/Hh3RX.png)
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~71~~ ~~70~~ ~~68~~ ~~64~~ ~~62~~ ~~52~~ ~~50~~ 47 bytes
```
A|->Max[i=0;#0@@Check[!#+A[[#]],-1]+1&@++i&/@A]
```
‚Äì3 thanks to [att](https://codegolf.stackexchange.com/users/81203/att)!
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73/H9pIW@iRXRmbYG1soGDg7OGanJ2dGKytqO0dHKsbE6uoax2oZqDtramWr6Do6x/wOKMvNKopUVdO0U0kAK1BT0HRSqqw1rdRSqDXUUQAjEtIQwETxjMM8IjFAlzXQUzKC0IVgOqNRcR8EEKAxmG4G5MFWGMFVg7bX/AQ "Wolfram Language (Mathematica) ‚Äì Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
·π´‚Äò·∏¢∆ä∆¨√ê∆§·∫à·πÄ_2
```
A monadic Link accepting a list of integers that yields an integer.
**[Try it online!](https://tio.run/##y0rNyan8///hztWPGmY83LHoWNexNYcnHFvycFfHw50N8Ub///@PNtMx1LHUMdYx1zHRMQPSRkCWmY5ZLAA "Jelly ‚Äì Try It Online")** Or see the [test-suite](https://tio.run/##y0rNyan8///hztWPGmY83LHoWNexNYcnHFvycFfHw50N8Ub/D7c/alrz/390tGEsl060oQ4QghiWOkhMYyDTCAiRBM10zCCUoQ5I3lzHRMcMSBsBWVApQ7AUWHksAA "Jelly ‚Äì Try It Online").
### How?
Unfortunately, while `·∏¢` pops off and yields the head of a list it affects the original list given to `√ê∆§` (for suffixes of the list) as well as the suffix being dealt with at the time and so affects the remaining suffixes. Without the popping we need to increment for `·π´` (tail from) to do the correct thing so I've incremented all elements, tailed from each of those and then kept the head of those lists. Maybe there is a better way to do this challenge that will take less bytes...?
```
·π´‚Äò·∏¢∆ä∆¨√ê∆§·∫à·πÄ_2 - Link: list of integers, River
     √ê∆§     - for each suffix of River:
    ∆¨       -   collect input values while distinct, applying:
   ∆ä        -     last three links as a monad:
 ‚Äò          -       increment all values
·π´           -       tail (vectorises, so tail at from incremented value)
  ·∏¢         -       head (the list that used the first incremented value)
       ·∫à    - length of each
        ·πÄ   - maximum
         _2 - subtract two (the final [] and the 0 that heading [] (or 0) yields)
```
---
This one is 13 bytes, but maybe the idea can lead to a shorter solution?
```
J≈íP·ªã·πñ‚ÅºI{ ã∆á‚Å∏·π™L
```
[Answer]
# [Nibbles](https://nibbles.golf), 10 bytes (19 nibbles)
```
`/.,,$-,`.$+=~$_$~]
```
## Explanation
```
`/.,,$-,`.$+=~$_$~]
`/                ] Maximum of list:
  .                   Map over
   ,,$                each index i of the input:
        `.$             Iterate starting at j = i, collecting all values:
           +              Add
            =~$_          the j-th element of the input or 0 if out of bounds
                $         to j
       ,                Get length
      -          ~      Subtract 1
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 21 bytes
```
eSmlP.u.x>NhN[)_d).__
```
[Test suite](http://pythtemp.herokuapp.com/?code=eSmlP.u.x%3ENhN%5B%29_d%29.__&test_suite=1&test_suite_input=%5B1%5D%0A%5B1%2C1%2C1%5D%0A%5B9%2C1%2C1%2C1%5D%0A%5B9%2C3%2C1%2C2%2C2%2C9%2C1%2C1%2C1%5D%0A%5B6%2C6%5D%0A%5B6%2C1%2C9%2C3%2C7%2C4%2C6%2C3%2C2%2C7%2C6%2C6%5D%0A%5B1%2C1%2C9%2C1%2C1%5D&debug=1)
##### Explanation:
```
eSmlP.u.x>NhN[)_d).__  | Full code
eSmlP.u.x>NhN[)_d).__Q | with implicit variables filled
-----------------------+----------------------------------------------------------------------------------------------------------------
  m            _  .__Q | Map over the list of suffixes `d` of the input:
     .u         d)     |  Repeat the following on `N`, starting with `d`, until a repeated value is given, collecting results in a list:
         >NhN          |   `N` from index (the first value of `N`) on
       .x    [)        |   (or the empty list if an error is thrown)
   lP                  |  Length of the resulting list - 1
eS                     | Get the max value of the resulting list
```
The final 7 bytes can be omitted if input is taken as a list of suffixes (not allowed by challenge author).
[Answer]
# [Husk](https://github.com/barbuz/Husk), 11 bytes
```
‚Üê‚ñ≤m»ØLU¬°S‚Üì‚Üê·π´
```
[Try it online!](https://tio.run/##yygtzv7//1HbhEfTNuWeWO8Temhh8KO2yUCBhztX////P9pSx1jHUMcICC2BNBDGAgA "Husk ‚Äì Try It Online")
## Explanation
```
‚Üê‚ñ≤m»ØLU¬°S‚Üì‚Üê·π´
          ·π´ suffixes
  m         map each to
      ¬°S‚Üì‚Üê  infinite list: drop first element no. of elements
    LU      length of unique prefix
‚Üê‚ñ≤          decrement maximum
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 11 bytes
```
;0¬µ+J¬´L·ªã∆¨`L
```
[Try it online!](https://tio.run/##y0rNyan8/9/a4NBWba9Dq30e7u4@tibB5//hds3I//@jow1juXSiDXWAEMSw1EFiGgOZRkCIJGimYwahDHVA8uY6JjpmQNoIyIJKGYKloMpNgfIgWYQlIGYsAA "Jelly ‚Äì Try It Online")
Feels like there ought to be one more byte to shave off, perhaps dealing with the final step with something shorter than `;0¬µ`, but it at least ties.
```
;0¬µ            Append a 0 to the list.
   +J          Find the sum of each element and its 1-index
     ¬´L        capped at the list's length.
       ·ªã∆¨`     Index this into itself (constant) until it doesn't change,
          L    and return the number of iterations that took.
```
`·πñ‚Äôo¬•\ƒã1‚Äò¬µ√ê∆§·πÄ` and `‚Äôo¬•\√ê∆§I>-¬ß·πÄ‚Äò`, a byte longer and completely different, also work.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 30 bytes
```
Ôº¶‚åàŒ∏‚äûŒ∏‚Å∞Ôº¶‚Æå‚Ä¶Ôº¨Œ∏¬ß‚âîŒ∏Œπ‚àß¬ßŒ∏Œπ‚äï¬ßŒ∏‚Å∫Œπ¬ßŒ∏ŒπÔº©‚åàŒ∏
```
[Try it online!](https://tio.run/##VY7NCoMwEITvPkWOG9hC/0gpnqQnoQXxKh6CbjWgKyZRfPtUPdm57DLzDUzValsNugvhO1gBH72YfuphlFJkk2thRHGWcbSHOc1kHUGuuSF4Eze@3ciVTZwzDSc@5ZqWrWRQJFzD0ZEoUq4s9cSe/qKsmxxsjSO9K44ya9jDSzt/HCfjEIpC4QWfeMMH3lGt97p@ClVZhtPc/QA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
Ôº¶‚åàŒ∏‚äûŒ∏‚Å∞
```
Append sufficient zeros so that we never jump off the end of the array.
```
Ôº¶‚Æå‚Ä¶Ôº¨Œ∏
```
Iterate over the array in reverse order.
```
¬ß‚âîŒ∏Œπ‚àß¬ßŒ∏Œπ‚äï¬ßŒ∏‚Å∫Œπ¬ßŒ∏Œπ
```
Update each non-zero element with `1` more than the number of skips of its next skip.
```
Ôº©‚åàŒ∏
```
Output the maximum number of skips.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 61 bytes
```
.+
,$&;
\d+
$*
+`,1(1)*;((?<-1>1*,)*(1*))
;1$3,$2
O^`1+
\G;?1
```
[Try it online!](https://tio.run/##NYmxCgIxEET7/Y4om80oTE4iEvHKK/2BQyJoYWMh/n/cE45h5y1vPs/v633vG51a3ydB2FaZH0mCSWqgMlpVHc87XmiIprQYpTIMCFmut8Yk81RH9k4hPHLCysGZPaspKH7EshxxQHFm/xbPv/f@AQ "Retina 0.8.2 ‚Äì Try It Online") Link includes test cases. Explanation:
```
.+
,$&;
```
Wrap the input list with an extra prefix `,` and a trailing marker `;`.
```
\d+
$*
```
Convert to unary.
```
+`
```
Repeat until the marker has reached the beginning of the array.
```
,1(1)*;((?<-1>1*,)*(1*))
```
Try to skip ahead to find how many additional skips to take. (If there aren't enough values then this just runs off the end of the array and finds no skips.)
```
;1$3,$2
```
Replace the current value with `1` more than the number of additional skips.
```
O^`1+
```
Sort the numbers of skips in descending order.
```
\G;?1
```
Convert the maximum to decimal.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~78~~ ~~77~~ 75 bytes
```
i;c;m;f(a,n)int*a;{for(m=0;n--;++a)for(c=i=0;i<=n;m=++c>m?c:m)i+=a[i];i=m;}
```
[Try it online!](https://tio.run/##dZLbbsIwDEDf9xVRJaSGphr0KgiFh2lfAX2o0pRFWwMilYaG@PV1btNbQOvNsY/t2HGZe2SsrgVltKSFnRGJhazmGb0Vp4tdJgsqXZc6ToYbnSUCLGKTSFomjsO25Y6tSyycJNuLlIqkpPca4lGZCWljdHtBcDWGiqtquU9Rgm7LOx1MXmcicE/MvjavyCMIeuAD8OB@dgm1S0SiiTHqjUvSxMYkIBFID1amYzwWtNKJ@xbmLVeat@0Q3YIWvhaBFqEWkRbxmKXVpU6ixA8/FXabC7922lyrBE2oZ1LPpL5JfZMGJg1MGpo0NGlk0siksUljPOmSX8@cVTzvTxP57QPH0q07X3aSqkLsI7vM4cvZJ7/oEOtwffcO19UbvKFF0FT3rS4afklkN9sJmfMrhC1ot9z0hfaFjLUOFoocp/XGbTL9r47DhnR64K1PSqcYyY7KJ3q@AC9sa2/h0TgtdCgTipRdDXjwnKaYqVkOrQPfNSewtuBbNRum2KxGQU6YCUHyAXAAwyj@qzRF7hbNcjRTBwk7KDJMAvJCfL/b/eVe/7LiKzuq2v3@Aw "C (gcc) ‚Äì Try It Online")
Inputs a pointer to an array of integers and its length (because pointers in C carry no length info).  
Returns the maximum number of skips.
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak) `-r`, 106 bytes
```
{({}(<()>)){({}<<>({}<>)>[(())])}{}<>(([(({})<><{{}({}<>)<>}{}>)]<>{}){(<{}>)[()]}{}<>({}()<>))<>}<>({}<>)
```
[Try it online!](https://tio.run/##NYwxCsNADAS/onK3cJE4XDAIfcRc4RSBkODCrbi3K1JMGmmHHelxbK99en62d4TDBxQ0sqKq1TTaCpCdowhI8kE19dR/glpWxq6WhUMLVrCfB2mlwbL@HyOaXGSRWe5yk5b7mqlJi@n4Ag "Brain-Flak ‚Äì Try It Online")
Starting from the end (which is the top of the stack since I used the `-r` flag), computes the number of skips from each position as 1 more than the previously calculated number of skips from its destination. The implicit zeros on the right stack account for the initial running maximum and number of skips from positions beyond the river.
In each iteration, the left stack has the positions not handled yet, and the right stack has the running maximum on top, followed by the number of skips from already handled positions.
Full code breakdown later.
[Answer]
# T-SQL, 96 bytes
```
WITH c(a,b,x)as(SELECT*,1FROM t
UNION ALL
SELECT t.*,x+1FROM c,t
WHERE a+b=i)SELECT max(x)FROM c
```
**[Try it online](https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=b4f04f50899874e476352c8b60c56295)**
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~41~~ 39 bytes
-1 (-2) thanks to [Roman](https://codegolf.stackexchange.com/questions/241591/how-many-times-can-i-skip-a-stone/241622?noredirect=1#comment544913_241622)
```
Depth[g=h@#;i=0;(g@i=g[++i+#]!)&/@#]-3&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73yW1oCQjOt02w0HZOtPWwFoj3SHTNj1aWztTWzlWUVNN30E5VtdY7X9AUWZeSbSyrl0aUECtLjg5Ma@umqvasFYHSOgAIYhhqYPENAYyjYAQSdBMxwxCGeqA5M11THTMgLQRkAWVMgRLgZRz1f7/DwA "Wolfram Language (Mathematica) ‚Äì Try It Online")
```
      g=h@#;                            associate g with this input
            i=0;       ++i     &/@#     for indices i of input l:
                (g@i=g[  i+#]!)           g[i]->Factorial[g[i+l„Äöi„Äõ]]
Depth[                             ]    depth
                                    -3  offset (-1 List, -2 g[_])
```
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), 19 bytes
```
‚åà¬¥¬∑{‚ü®‚ü©:0;1+ùïä‚äë‚ä∏‚Üìùï©}¬®‚Üì
```
Anonymous function that takes a list of integers and returns an integer. [Run it online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAg4oyIwrTCt3vin6jin6k6MDsxK/CdlYriipHiirjihpPwnZWpfcKo4oaTCgpGwqgg4p+oCiDin6gx4p+pLAog4p+oOSwzLDEsMiwyLDksMSwxLDHin6ksCiDin6g2LDEsOSwzLDcsNCw2LDMsMiw3LDYsNuKfqSwKIOKfqDEsMSw5LDEsMeKfqQrin6k=)
### Explanation
```
‚åà¬¥¬∑{‚ü®‚ü©:0;1+ùïä‚äë‚ä∏‚Üìùï©}¬®‚Üì
                  ‚Üì  Get the suffixes of the input list
   {            }¬®   Apply this function to each of them:
    ‚ü®‚ü©:0                If the argument is an empty list, return 0
       ;               Else:
               ùï©         Take the argument
             ‚ä∏‚Üì          Drop a number of elements from it
            ‚äë            equal to its first element
                         (If there aren't that many elements, the result is empty)
           ùïä             Call this function recursively with that shorter list
         1+              Add 1 to the result of the recursive call
‚åà¬¥¬∑                  Get the maximum of the resulting list of integers
```
For example, with input `‚ü®1,1,9,1,1‚ü©`, the suffixes are `‚ü®‚ü®1,1,9,1,1‚ü©, ‚ü®1,9,1,1‚ü©, ‚ü®9,1,1‚ü©, ‚ü®1,1‚ü©, ‚ü®1‚ü©, ‚ü®‚ü©‚ü©`. When the inner function is called with the suffix `‚ü®1,9,1,1‚ü©`:
* `‚ü®1,9,1,1‚ü©` is not empty, so drop the first 1 element and recurse
	+ `‚ü®9,1,1‚ü©` is not empty, so drop the first 9 elements and recurse
		- `‚ü®‚ü©` is empty, so return 0
	+ Add 1 to 0 and return 1
* Add 1 to 1 and return 2
This is the number of skips that are possible starting from the second 1 in the original list.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 71 bytes
```
Max[l@Most@NestWhileList[#+w[[#]]&,#,#<=l@w&]&/@Range@(l=Length)[w=#]]&
```
[Try it online!](https://tio.run/##TYpBCsIwEEX3nkIIFMWB0CoVwcAcoBVx4yJ0ESQkgbSCGahQevaYqIvyYf5j3u8VWd0rcg8VjYitekuP7TMQXnSgu3VeNy6QZLtRStZ1BTBgZ@FxLLqC400NRuPGi0YPhuxWjiKP4vXlBlpzNByn1VTOkA6kZDjBAvcJq5TFs4b6VyVkf4QD1KmrRH9VflWezzF@AA "Wolfram Language (Mathematica) ‚Äì Try It Online")
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~30~~ 24 bytes
```
FnRglAE:Uv<n|1+(lv-n)MXl
```
Takes the input numbers as separate command-line arguments. [Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgwYKlpSVpuhY73PKC0nMcXa1Cy2zyagy1NXLKdPM0fSNyINJQVZujLXWMdQx1jIDQEkgDYSxUCgA)
Implements the spec somewhat directly. Still searching for a golfier approach.
]