#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
char s[100100];
int main() {
  scanf("%d%d", &n, &m);
  scanf("%s", s);
  int l = strlen(s);
  l--;
  int i = 0, j = l, le = l, ri = 0;
  for (; i < j; i++, j--) {
    int k = abs(s[i] - s[j]);
    if (k) {
      le = min(le, i);
      ri = max(ri, i);
    }
    k = min(k, 26 - k);
    ans += k;
  }
  m--;
  int d = min(abs(m - ri) + (ri - le), abs(m - le) + (ri - le));
  le = l - le;
  ri = l - ri;
  d = min(d, abs(m - ri) + le - ri);
  d = min(d, abs(m - le) + le - ri);
  if (le >= ri) ans += d;
  cout << ans << endl;
}
