#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
char str[N];
int main() {
  int n, m;
  cin >> n >> m;
  cin >> str;
  if (m > n / 2) {
    reverse(str, str + n);
    m = n - m + 1;
  }
  m--;
  int l = -1;
  int r = -1;
  for (int i = 0; i < n / 2; i++) {
    if (str[i] != str[n - i - 1] && i <= m && l == -1) l = i;
    if (str[i] != str[n - i - 1] && i >= m) r = i;
  }
  if (r == -1) r = m;
  if (l == -1) l = m;
  int ans = 0;
  for (int i = l; i <= r; i++) {
    int d = abs(str[i] - str[n - i - 1]);
    ans += min(d, 26 - d);
  }
  ans += r - l;
  ans += min(r - m, m - l);
  cout << ans;
  return 0;
}
