def xeval(sexpr):
    """
    >>> xeval('')
    0
    >>> xeval('1234567')
    1234567
    >>> xeval('+1234567')
    1234567
    >>> xeval('-1234567')
    -1234567
    >>> xeval('2+3')
    5
    >>> xeval('2-3')
    -1
    >>> xeval('2-23+4')
    -17
    >>> xeval('2-01+3-1')
    3
    >>> xeval('1-2-3-4-5')
    -13
    """
    if not sexpr:
        return 0
    size = len(sexpr)
    start = 0
    curr = 1 if sexpr[0] == '+' or sexpr[0] == '-' else 0
    while curr < size and sexpr[curr] != '+' and sexpr[curr] != '-':
        curr += 1
    this = int(sexpr[start:curr])
    if curr >= size - 1:
        return this
    return this + xeval(sexpr[curr:])