#include using namespace std; int main(void) { /*Aw-(C-Ab)のこる C-Abこ移動して (Bw+C-Ab)>> aw >> ab >> bw >> bb >> c >> d; if (bw + c - ab >= d)ans = aw - c + ab + d; else ans = aw + bw; cout << ans << endl; return 0; }