#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[6], b[6];
  while (cin >> n) {
    int ret = -1, flag = 0;
    for (int i = 1; i <= 5; i++) a[i] = b[i] = 0;
    for (int i = 0, t; i < n; i++) cin >> t, a[t]++;
    for (int i = 0, t; i < n; i++) cin >> t, b[t]++;
    for (int i = 1; i <= 5; i++)
      if ((a[i] + b[i]) & 1) flag = 1;
    if (!flag) {
      ret = 0;
      for (int i = 1; i <= 5; i++)
        if (a[i] > b[i]) {
          ret += a[i] - (a[i] + b[i]) / 2;
        }
    }
    cout << ret << endl;
  }
  return 0;
}
