#include <iostream>
using namespace std;
const int N = 1e5+10;
int box1[N], box2[N];
int main()
{
int n, m;
long long ans = 0;
box1[N] = 1, box2[N] = 1;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
int x;
cin >> x;
box1[x]++;
}
for (int i = 1; i <= m; i++) {
int x;
cin >> x;
box2[x]++;
}
for (int i=1, j=1; i <= N && j <= N; ) {
while (box2[j] == 0) j++;
while (box1[i] == 0) i++;
while (box2[j] > 0 && box1[i] > 0) {
ans += j;
box2[j]--;
box1[i]--;
}
if (box1[i] > 0) continue;
i++,j++;
}
for (int i = 1; i <= N+1; i++) {
if (box1[i]-1 == 1) {
cout << "you died!" << endl;
return 0;
}
}
cout << ans << endl;
return 0;
}