#include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename Q_type>
using smaller_queue = priority_queue<Q_type, vector<Q_type>, greater<Q_type>>;

const int MOD_TYPE = 1;
const ll MOD = (MOD_TYPE == 1 ? (ll)(1e9 + 7) : 998244353);
const int INF = (int)1e9;
const ll LINF = (ll)4e18;
const ld PI = acos(-1.0);
const ld EPS = 1e-11;

#define REP(i, m, n) for (ll i = m; i < (ll)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define possible(n) cout << ((n) ? "possible" : "impossible") << endl
#define Yay(n) cout << ((n) ? "Yay!" : ":(") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x) cerr << #x << ":" << x << endl;

vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(30) << setiosflags(ios::fixed);
  int n;
  cin >> n;
  string s[3];
  rep(i, 3) cin >> s[i];
  int cnt = 0;
  rep(i, n)
  {
    if (s[0][i] == s[1][i] && s[1][i] == s[2][i])
      continue;
    if (s[0][i] != s[1][i] && s[1][i] != s[2][i] && s[0][i] != s[2][i])
      cnt += 2;
    else
      cnt++;
  }
  cout << cnt << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll h,w;
ll direction2[4][2]={{1,0},{0,1},{0,-1},{-1,0}};
bool valid(int a,int b)
{
    if(a>=1&&a<=h&&b>=1&&b<=w)return true;
    else return false;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,x=1000000;
    cin>>n;
    unordered_map<ll,ll>nw,ne;
    string s;
    cin>>s;
    for(int i=0;i<n;i++){
        if(s[i]=='W')nw[i]=1+nw[i-1];
        else nw[i]=nw[i-1];
        if(s[n-i-1]=='E')ne[n-i-1]=1+ne[n-i];
        else ne[n-i-1]=ne[n-i];
    }
    for(int i=0;i<n;i++){
        x=min(x,(nw[i-1]+ne[i+1]));
        //cout<<nw[i-1]<<" "<<ne[i+1]<<endl;
    }
    cout<<x;
}
