#include <bits/stdc++.h>
int n, p, len;
char S[100001];
int data[100001];
int count;
int max1, max2;
int main() {
  int i, j;
  int table[] = {0,  1,  2,  3,  4, 5, 6, 7, 8, 9, 10, 11, 12,
                 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,  2,  1};
  scanf("%d %d", &n, &p);
  scanf("%s", S);
  len = strlen(S);
  if (len == 1) {
    printf("%d\n", count);
    return 0;
  }
  for (i = 0; i < len / 2; i++)
    if (S[i] != S[len - 1 - i]) {
      data[i] = data[len - 1 - i] = table[abs(S[len - 1 - i] - S[i])];
      count += table[abs(S[len - 1 - i] - S[i])];
    }
  if (len / 2 <= p) {
    for (i = len / 2; i < p; i++)
      if (data[i] > 0)
        if (abs(p - i - 1) > max1) max1 = abs(p - i - 1);
    for (i = p; i < len; i++)
      if (data[i] > 0)
        if (abs(p - i - 1) > max2) max2 = abs(p - i - 1);
    if (max1 < max2)
      count += max1 * 2 + max2;
    else
      count += max1 + max2 * 2;
  } else {
    for (i = 0; i < p; i++)
      if (data[i] > 0)
        if (abs(p - i - 1) > max1) max1 = abs(p - i - 1);
    for (i = p; i < len / 2; i++)
      if (data[i] > 0)
        if (abs(p - i - 1) > max2) max2 = abs(p - i - 1);
    if (max1 < max2)
      count += max1 * 2 + max2;
    else
      count += max1 + max2 * 2;
  }
  printf("%d\n", count);
  return 0;
}
