You are given undirected weighted graph. Find the length of the shortest cycle which starts from the vertex 1 and passes throught all the edges at least once. Graph may contain multiply edges between a pair of vertices and loops (edges from the vertex to itself).

Input

The first line of the input contains two integers n and m (1 ≤ n ≤ 15, 0 ≤ m ≤ 2000), n is the amount of vertices, and m is the amount of edges. Following m lines contain edges as a triples x, y, w (1 ≤ x, y ≤ n, 1 ≤ w ≤ 10000), x, y are edge endpoints, and w is the edge length.

Output

Output minimal cycle length or -1 if it doesn't exists.

Examples

Input

3 3
1 2 1
2 3 1
3 1 1


Output

3


Input

3 2
1 2 3
2 3 4


Output

14
import os
import sys
from io import BytesIO, IOBase
from types import GeneratorType
from collections import defaultdict

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def bootstrap(f, stack=[]):
    def wrappedfunc(*args, **kwargs):
        if stack:
            return f(*args, **kwargs)
        else:
            to = f(*args, **kwargs)
            while True:
                if type(to) is GeneratorType:
                    stack.append(to)
                    to = next(to)
                else:
                    stack.pop()
                    if not stack:
                        break
                    to = stack[-1].send(to)
            return to
    return wrappedfunc
















@bootstrap
def optimal_path(curr):
    global res
    global best

    if curr==[]:
        res=min(res,best)
        yield

    last=curr.pop()
    i = 0
    while i < len(curr):
        req = curr.pop(i)

        best += adj[req][last]
        yield optimal_path(curr)
        best -= adj[req][last]
        curr.insert(i, req)
        i += 1
    curr.append(last)
    yield


n,m=map(int,input().split())
adj=[[float("inf") for i in range(n+1)] for j in range(n+1)]
for i in range(1,n+1):
    adj[i][i]=0
deg=[0]*(n+1)
tot=0
for j in range(m):
    u,v,w=map(int,input().split())
    tot+=w
    adj[u][v]=min(adj[u][v],w)
    adj[v][u]=min(adj[v][u],w)
    deg[u]+=1
    deg[v]+=1

#Floyd Warshall
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            adj[j][k]=min(adj[j][k],adj[j][i]+adj[i][k])

poss=1
for i in range(1,n+1):
    if deg[i]>0 and adj[1][i]==float("inf"):
        poss=0
        break

if not poss:
    print(-1)

else:
    oddver=[]
    for i in range(1,n+1):
        if deg[i]%2:
            oddver.append(i)


    res=float("inf")
    best=0
    optimal_path(oddver)
    print(tot+res)




