#include #include #include using namespace std; int main() { int a[105],b[105],i; int n; while(scanf("%d",&n)&&n) { int sum,sum1; sum=sum1=0; for(i=0;ib[i]) sum+=2; if(a[i]