#include <bits/stdc++.h>
#include <stdio.h>
#include <math.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long int>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long int>>;
using ll = long long int;

int main(){
    ll N; string A, B, C; cin >> N >> A >> B >> C;
    ll c = 0;
    for(int i=0; i<N; i++){
        if(A[i] == B[i]&&B[i] ==C[i]){}
        else if(A[i] == B[i]&&B[i] !=C[i]){c++;}
        else if(A[i] != B[i]&&B[i] ==C[i]){c++;}
        else if(A[i] == C[i]&&B[i] !=C[i]){c++;}
        else{c += 2;}
    }
    cout << c;
}
#pragma GCC optimize("Ofast")  
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long 
#define endl "\n"
#define all(x) (x).begin(),(x).end()
const int MOD = 1e9+7;
const int mxN = 2e5+3;

void solve(){
	int n, x, t;
	cin >> n >> x >> t;
	int r = n/x;
	if(n % x != 0)r++;
	int ans = r * t;
	cout << ans << endl;
}

int32_t main(){
	IO;
	
	int nT = 1;
	//cin >> nT;
	for(int i = 1; i <= nT; ++i)
		solve();
	return 0;
}
