#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define faster() ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define MOD 1000000007
void solve(){
int n ; cin >> n ;
int t[n + 1] , r[n + 1];
for(int i = 1 ; i <= n ; i++) cin >> t[i];
for(int i = 1 ; i <= n - 1 ; i++) cin >> r[i];
int dp[n + 1] = {}; // dp[i] : thoi gian toi thieu de phuc vu tu nguoi thu 1 => nguoi thu i
dp[1] = t[1] ; // nguoi dau tien tu mua ve
for(int i = 2 ; i <= n ; i++){
dp[i] = min(dp[i - 1] + t[i] , dp[i - 2] + r[i - 1]);
}
cout << dp[n] << endl;
}
signed main(){
faster();
int test = 1;
// cin >> test ;
while(test--){
solve();
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbmRsICJcbiIKI2RlZmluZSBpbnQgbG9uZyBsb25nCiNkZWZpbmUgZmFzdGVyKCkgaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOyBjaW4udGllKG51bGxwdHIpOyBjb3V0LnRpZShudWxscHRyKTsKI2RlZmluZSBNT0QgMTAwMDAwMDAwNwoKdm9pZCBzb2x2ZSgpewogICAgaW50IG4gIDsgY2luID4+IG4gOwogICAgaW50IHRbbiArIDFdICwgcltuICsgMV07CiAgICBmb3IoaW50IGkgPSAxIDsgaSA8PSBuIDsgaSsrKSBjaW4gPj4gdFtpXTsKICAgIGZvcihpbnQgaSA9IDEgOyBpIDw9IG4gLSAxIDsgaSsrKSBjaW4gPj4gcltpXTsKCiAgICBpbnQgZHBbbiArIDFdID0ge307IC8vIGRwW2ldIDogdGhvaSBnaWFuIHRvaSB0aGlldSBkZSBwaHVjIHZ1IHR1IG5ndW9pIHRodSAxID0+IG5ndW9pIHRodSBpCiAgICBkcFsxXSA9IHRbMV0gOyAvLyBuZ3VvaSBkYXUgdGllbiB0dSBtdWEgdmUgCiAgICBmb3IoaW50IGkgPSAyIDsgaSA8PSBuIDsgaSsrKXsKICAgICAgICBkcFtpXSA9IG1pbihkcFtpIC0gMV0gKyB0W2ldICwgZHBbaSAtIDJdICsgcltpIC0gMV0pOwogICAgfQogICAgY291dCA8PCBkcFtuXSA8PCBlbmRsOwp9CgpzaWduZWQgbWFpbigpewogICAgZmFzdGVyKCk7CiAgICBpbnQgdGVzdCA9IDE7CiAgICAvLyBjaW4gPj4gdGVzdCA7CiAgICB3aGlsZSh0ZXN0LS0pewogICAgICAgIHNvbHZlKCk7CiAgICB9Cn0=