#include <bits/stdc++.h>
using namespace std;
int n, p, lt, rt, mn, mx, ans, d[50005];
char c[100005];
int main() {
  int i, j;
  cin >> n >> p;
  cin >> c;
  if (p > n / 2) p = n + 1 - p;
  p--;
  for (i = 0, j = n - 1; i < j; i++, j--) {
    if (c[i] < c[j]) swap(c[i], c[j]);
    d[i] = c[i] - c[j];
    if (d[i] > 13) d[i] = 26 - d[i];
    ans += d[i];
  }
  for (i = p - 1, lt = p; i >= 0; i--) {
    if (d[i] > 0) lt = i;
  }
  lt = p - lt;
  for (i = p + 1, rt = p; i <= (n - 1) / 2; i++) {
    if (d[i] > 0) rt = i;
  }
  rt = rt - p;
  mn = min(lt, rt);
  mx = max(lt, rt);
  if (mn == 0)
    ans += mx;
  else
    ans += mn * 2 + mx;
  cout << ans << endl;
  return 0;
}
