AC代码
#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
int main()
{
#ifdef LOCAL
//freopen("C:/input.txt", "r", stdin);
#endif
int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
cout << min(a, e) + min(b, f) + min(c, d) << endl;
return 0;
}