usingnamespace std; #define MAXN 16 //#define int long long #define rep( i , a , b ) for (int i = (a), i##end = (b); i <= i##end; ++i) #define per( i , a , b ) for (int i = (a), i##end = (b); i >= i##end; --i) #define pii pair<int,int> #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define vi vector<int> #define all( x ) (x).begin() , (x).end() #define mem( a ) memset( a , 0 , sizeof a ) typedeflonglong ll; #define P 998244353
int n; int G[MAXN][MAXN]; ll dp[1 << MAXN][MAXN] , pd[1 << MAXN][MAXN];
voidsolve( ){ cin >> n; rep( i , 1 , n ) rep( j , i + 1 , n ) scanf("%d",&G[i][j]) , G[j][i] = G[i][j]; memset( pd , 0x3f , sizeof pd ) , memset( dp , 0x3f , sizeof dp ); rep( S , 1 , ( 1 << n ) - 1 ) { int sz = __builtin_popcount( S ); rep( i , 1 , n ) if( S & ( 1 << i - 1 ) ) { if( sz == 1 ) dp[S][i] = 0; for( int T = ( S - 1 ) & S ; T ; T = ( T - 1 ) & S ) if( ~T & ( 1 << i - 1 ) ) dp[S][i] = min( dp[S][i] , pd[T][i] + dp[S ^ T][i] ); } rep( i , 1 , n ) { rep( v , 1 , n ) if( S & ( 1 << v - 1 ) ) if( G[i][v] ) pd[S][i] = min( pd[S][i] , 1ll * sz * ( n - sz ) * G[i][v] + dp[S][v] ); } } ll res = 0x3f3f3f3f3f3f3f3f; rep( i , 1 , n ) res = min( res , dp[( 1 << n ) - 1][i] ); cout << res << endl; }