def METHOD_NAME(crystal):
    C = make_path_crystal(crystal)
    element = int(request.args.get("element"))
    i = int(request.args.get("i"))
    l = int(request.args.get("l"))
    x = C[element]
    if l >= 0:
        y = x.f_string([i] * l)
    else:
        y = x.e_string([i] * -l)
    ret = str(C.rank(y))
    return 1 if ret == "NaN" else ret