New Year is coming in Line World! In this world, there are *n* cells numbered by integers from 1 to *n*, as a 1 × *n* board. People live in cells. However, it was hard to move between distinct cells, because of the difficulty of escaping the cell. People wanted to meet people who live in other cells.

So, user tncks0121 has made a transportation system to move between these cells, to celebrate the New Year. First, he thought of *n* - 1 positive integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n* - 1</sub>. For every integer *i* where 1 ≤ *i* ≤ *n* - 1 the condition 1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *n* - *i* holds. Next, he made *n* - 1 portals, numbered by integers from 1 to *n* - 1. The *i*-th (1 ≤ *i* ≤ *n* - 1) portal connects cell *i* and cell (*i* + *a*<sub class="lower-index">*i*</sub>), and one can travel from cell *i* to cell (*i* + *a*<sub class="lower-index">*i*</sub>) using the *i*-th portal. Unfortunately, one cannot use the portal backwards, which means one cannot move from cell (*i* + *a*<sub class="lower-index">*i*</sub>) to cell *i* using the *i*-th portal. It is easy to see that because of condition 1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *n* - *i* one can't leave the Line World using portals.

Currently, I am standing at cell 1, and I want to go to cell *t*. However, I don't know whether it is possible to go there. Please determine whether I can go to cell *t* by only using the construted transportation system.
The first line contains two space-separated integers *n* (3 ≤ *n* ≤ 3 × 10<sup class="upper-index">4</sup>) and *t* (2 ≤ *t* ≤ *n*) — the number of cells, and the index of the cell which I want to go to.

The second line contains *n* - 1 space-separated integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n* - 1</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *n* - *i*). It is guaranteed, that using the given transportation system, one cannot leave the Line World.
# Solution here
def solve(tt):
    n, t = __list(int)
    a = __list(int)
    i = 0
    while i + 1 < n:
        if i + 1 == t:
            return print("YES")
        i += a[i]
        
    print("NO")


def main():
    t = 1
    # t = _int()
    for tt in range(1, t + 1):
        solve(f"{tt}: -------------")
    return


class Dict:
    # Custom Dictionary
    def __init__(self, default=int):
        self.default = default
        self.x = randrange(1, 1 << 31)
        self.dd = defaultdict(default)

    def __repr__(self):
        return "{"+", ".join(f"{k ^ self.x}: {v}" for k, v in self.dd.items())+"}"

    def __eq__(self, other):
        for k in set(self) | set(other):
            if self[k] != other[k]:
                return False
        return True

    def __or__(self, other):
        res = Dict(self.default)
        for k, v in self.dd:
            res[k] = v
        for k, v in other.dd:
            res[k] = v
        return res

    def __len__(self):
        return len(self.dd)

    def __getitem__(self, item):
        return self.dd[item ^ self.x]

    def __setitem__(self, key, value):
        self.dd[key ^ self.x] = value

    def __delitem__(self, key):
        del self.dd[key ^ self.x]

    def __contains__(self, item):
        return item ^ self.x in self.dd

    def items(self):
        for k, v in self.dd.items():
            yield (k ^ self.x, v)

    def keys(self):
        for k in self.dd:
            yield k ^ self.x

    def values(self):
        for v in self.dd.values():
            yield v

    def __iter__(self):
        for k in self.dd:
            yield k ^ self.x


class Set:
    # Custom Set
    def __init__(self, aa=[]):
        self.x = randrange(1, 1 << 31)
        self.st = set()
        for a in aa:
            self.st.add(a ^ self.x)

    def __repr__(self):
        return "{"+", ".join(str(k ^ self.x) for k in self.st)+"}"

    def __len__(self):
        return len(self.st)

    def add(self, item):
        self.st.add(item ^ self.x)

    def discard(self, item):
        self.st.discard(item ^ self.x)

    def __contains__(self, item):
        return item ^ self.x in self.st

    def __iter__(self):
        for k in self.st:
            yield k ^ self.x

    def pop(self):
        return self.st.pop() ^ self.x

    def __or__(self, other):
        res = Set(self)
        for a in other:
            res.add(a)
        return res

    def __and__(self, other):
        res = Set()
        for a in self:
            if a in other:
                res.add(a)
        for a in other:
            if a in self:
                res.add(a)
        return res


def bootstrap(f, stack=[]):
    def wrappedFunc(*args, **kwargs):
        if stack:
            return f(*args, **kwargs)
        else:
            to = f(*args, **kwargs)
            while True:
                if type(to) is GeneratorType:
                    stack.append(to)
                    to = next(to)
                else:
                    stack.pop()
                    if not stack:
                        break
                    to = stack[-1].send(to)
            return to
    return wrappedFunc


def dbg(*args):
    from inspect import currentframe, getframeinfo
    from re import search
    debug = lambda *args, end="\n": stderr.write(
        " ".join([str(x) for x in args]) + end)
    frame = currentframe().f_back
    s = getframeinfo(frame).code_context[0]
    r = search(r"\((.*)\)", s).group(1)
    var_name = r.split(", ")
    stderr.write("\n")
    prefix = f"{currentframe().f_back.f_lineno:02d}) "
    stderr.write(prefix)
    for var, val in zip(var_name, args):
        debug(f"{var} = {val}")


if __name__ == "__main__":
    from sys import stdin, stderr, stdout, maxsize
    from math import *
    from bisect import *
    from collections import Counter, deque, defaultdict
    from random import randint, randrange
    from heapq import nsmallest, nlargest, heapify, heappop, heappush
    import math
    from typing import Generic, Iterable, Iterator, List, Tuple, TypeVar, Optional
    from types import GeneratorType
    def input(): return stdin.buffer.readline().decode().rstrip()
    def _int(): return int(input())
    def __list(dtype): return list(map(dtype, input().split()))
    def _list(): return list(map(int, input().split()))
    print = lambda *args, end = "\n", sep = " ": stdout.write(
        sep.join(map(str, args)) + end
    )
    main()
