#include <bits/stdc++.h>
using namespace std;
int n, p, r2, r1, l, r;
char a[100007];
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  if (p > n / 2) p = n - p + 1;
  for (int i = 1; i <= n / 2; ++i) {
    char c1 = a[i], c2 = a[n - i + 1];
    if (c1 < c2) swap(c1, c2);
    r1 += min(c1 - c2, c2 + 26 - c1);
    if (a[i] != a[n - i + 1]) {
      if (!l)
        l = i;
      else if (i > p)
        r = i;
    }
  }
  if (l > p) l = 0;
  if (l != 0 && r == 0) r2 = p - l;
  if (l == 0 && r != 0) r2 = r - p;
  if (l != 0 && r != 0) r2 = r - l + min(p - l, r - p);
  cout << r1 + r2;
  return 0;
}
