def parse_lsn(lsn_string):
    """
    Transform a string XLOG location, formatted as %X/%X, in the corresponding
    numeric representation

    :param str lsn_string: the string XLOG location, i.e. '2/82000168'
    :rtype: int
    """
    lsn_list = lsn_string.split('/')
    if len(lsn_list) != 2:
        raise ValueError('Invalid LSN: %s', lsn_string)
    return (int(lsn_list[0], 16) << 32) + int(lsn_list[1], 16)
