#include <bits/stdc++.h>
using namespace std;
char str[100001];
int dif[100001];
int n, k;
int calc(char a, char b) {
  if (a > b) swap(a, b);
  return min(b - a, (a - 'a') + ('z' - b + 1));
}
int main() {
  cin.sync_with_stdio(0);
  cin >> n >> k >> str;
  --k;
  int mid = n / 2;
  for (int i = 0; i < mid; ++i) {
    int l = i, r = n - i - 1;
    dif[l] = dif[r] = calc(str[l], str[r]);
  }
  int maxl = n;
  int maxr = 0;
  int sum = 0;
  if (k >= mid) {
    for (int i = mid; i < n; ++i) {
      sum += dif[i];
      if (dif[i] > 0) {
        maxl = min(i, maxl);
        maxr = max(maxr, i);
      }
    }
  } else {
    for (int i = 0; i < mid; ++i) {
      sum += dif[i];
      if (dif[i] > 0) {
        maxl = min(i, maxl);
        maxr = max(maxr, i);
      }
    }
  }
  if (maxl != n && maxl < k) {
    sum += (k - maxl);
  }
  if (maxr != 0 && maxr > k) {
    sum += (maxr - k);
  }
  if (maxl < k && maxr > k) {
    sum += min(k - maxl, maxr - k);
  }
  cout << sum << endl;
  return 0;
}
