#include #include using namespace std; int main() { int aw,ab,bw,bb,c,d; cin>>aw>>ab>>bw>>bb>>c>>d; int t=min(c-ab, aw); cout<