#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, l, r, ans = 0;
  cin >> n >> p;
  string s;
  cin >> s;
  p--;
  if (p + 1 > n / 2) {
    reverse(s.begin(), s.end());
    p = n - p - 1;
  }
  l = p;
  r = p;
  for (int i = 0; i < n / 2; i++) {
    if (s[i] != s[n - i - 1]) {
      l = min(i, l);
      r = max(i, r);
    }
  }
  if (p - l < r - p)
    ans += p - l;
  else
    ans += r - p;
  for (int i = l; i <= r; i++) {
    if (s[i] != s[n - i - 1]) {
      char q1 = s[i];
      char q2 = s[n - 1 - i];
      if (q1 > q2) swap(q1, q2);
      int a = q2 - q1;
      if (a < (q1 - 'a') + 1 + ('z' - q2)) {
        ans += a;
      } else
        ans += (q1 - 'a') + 1 + ('z' - q2);
    }
  }
  ans += r - l;
  cout << ans;
  return 0;
}
