#include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<long long>;
const int N = 1e5 + 10, INF = 1e9 + 10, mod = 1e9 + 7;
void wyx() {
int n, x, y;
cin >> n >> x >> y;
string a, b, c, s;
cin >> a >> b >> c;
int ans = 0;
int cnt = 0;
vector<int> sum(4, 0);
for (int i = 0; i < n; i ++ )
{
int ai = a[i] - '0';
int bi = b[i] - '0';
int ci = c[i] - '0';
if (ai ^ bi != ci)
{
cnt ++ ;
if (ai == 0 && bi == 0) sum[0] ++ ;
else if (ai == 0 && bi == 1) sum[1] ++ ;
else if (ai == 1 && bi == 0) sum[2] ++ ;
else if (ai == 1 && bi == 1) sum[3] ++ ;
}
}
if (x * 2 <= y)
{
cout << x * cnt << endl;
return;
}
while (1)
{
sort(sum.begin(), sum.end());
ans += sum[2] * y;
sum[3] -= sum[2];
sum[2] -= sum[2];
int count = 0;
for (int i = 0; i < 4; i ++ ) if (sum[i]) count ++ ;
if (count <= 1) break;
}
for (int i = 0; i < 4; i ++ ) ans += sum[i] * x;
cout << ans << endl;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
//cin >> t;
while(t--) {
wyx();
}
return 0;
}