https://www.nowcoder.com/acm/contest/201/A
水
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
int a, b, c, d, e, f;
while (~scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f))
{
int res = min(a, e) + min(b, f) + min(c, d);
printf("%d\n", res);
}
return 0;
}