#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; const ll MOD = 1000000007; const ll INF = 1e18; #define REP(i, n) for (int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() int main(){ int n; cin >> n; VI a(n), b(n); REP(i,n) cin >> a[i]; REP(i,n) cin >> b[i]; bool up=0, no=0; ll ans=0; REP(i,n){ if(a[i]