<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def number_of_states(dtrajs):
 r""" Determine the number of states from a set of discrete trajectories Parameters dtrajs : list of int-arrays discrete trajectories """

    # determine number of states n
    nmax = 0
    for dtraj in dtrajs:
        nmax = max(nmax, np.max(dtraj))
    # return number of states
    return nmax + 1