#include #define endl enjoy_codeforces int main(){ int n;std::cin>>n; n--; std::vectora(n),b(n); for(int i=0;i>a.at(i)>>b.at(i); } int A=std::accumulate(a.begin(),a.end(),0); int B=std::accumulate(b.begin(),b.end(),0); int ans=std::min(A,B); for(int i=0;i