#include <bits/stdc++.h>
using namespace std;
int main() {
  int H, W, a, T1, T2;
  cin >> H >> W;
  int array1[W];
  int array2[W];
  for (int i = 0; i < W; i++) {
    cin >> array1[i];
    T1 = T1 + array1[i];
  }
  for (int i = 0; i < W; i++) {
    cin >> array2[i];
    T2 = T2 + array2[i];
  }
  a = T1 + T2;
  cout << a - 11322322 << endl;
  return 0;
}
