def pe2(limit=4000000):
    """
    Sum of the even-valued Fibonacci sequence

    >>> pe2()
    4613732
    """
    a, b, s = 1, 2, 2
    while b <= limit:
        a, b = b, a + b
        if not b & 1:
            s += b
    return s