#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 100;
const int maxm = 100 + 100;
const int INF = 0x3f3f3f3f;
typedef long long LL;
typedef pair<int,int> P;
//const LL mod = 1e9 + 7;
#define PI 3.1415926
#define sc(x) scanf("%d",&x)
#define pf(x) printf("%d",x)
#define pfn(x) printf("%d\n",x)
#define pfln(x) printf("%lld\n",x)
#define pfs(x) printf("%d ",x)
#define rep(n) for(int i = 0; i < n; i++)
#define per(n) for(int i = n-1; i >= 0; i--)
#define mem(a,x) memset(a,x,sizeof(a))
struct edge
{
int from,to,cap,flow,cost;
edge(int from,int to, int cap, int flow, int cost) : from(from),to(to),cap(cap),flow(flow),cost(cost) {}
};
int tot = 0;
vector<edge> E;
vector<int> G[maxn];
int inq[maxn];
int d[maxn];
int p[maxn];
int a[maxn];
void addedge(int from, int to, int cap, int cost)
{
E.push_back(edge(from,to,cap,0,cost));
E.push_back(edge(to,from,0,0,-cost));
tot = E.size();
G[from].push_back(tot-2);
G[to].push_back(tot-1);
}
bool spfa(int s, int t, int &flow, int &cost)
{
mem(d,INF);
mem(inq,0);
d[s] = 0,inq[s] = 1; p[s] = 0, a[s] = INF;
queue<int> Q;
Q.push(s);
while(!Q.empty())
{
int u = Q.front();Q.pop();
inq[u] = 0;
for(int i = 0; i < G[u].size(); i++)
{
edge e = E[G[u][i]];
if(e.cap > e.flow && d[e.to] > d[u] + e.cost)
{
d[e.to] = d[u] + e.cost;
p[e.to] = G[u][i];
a[e.to] = min(a[u],e.cap - e.flow);
if(!inq[e.to]) {Q.push(e.to); inq[e.to] = 1;}
}
}
}
if(d[t] == INF) return false;
flow += a[t];
cost += d[t] * a[t];
int u = t;
while(u != s)
{
E[p[u]].flow += a[t];
E[p[u]^1].flow -= a[t];
u = E[p[u]].from;
}
return true;
}
int mcf(int s, int t)
{
int flow = 0,cost = 0;
while(spfa(s,t,flow,cost)) ;
return cost;
}
int main()
{
//记得初始化各个变量
int s,t;
mcf(s,t);
}