#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  p--;
  string s;
  cin >> s;
  if (p >= n / 2) {
    reverse(s.begin(), s.end());
    p = n - p - 1;
  }
  int l = p, r = p;
  for (int i = p; i >= 0; i--)
    if (s[i] != s[n - i - 1]) l = i;
  for (int i = p; i <= n / 2 - 1; i++)
    if (s[i] != s[n - i - 1]) r = i;
  long long ans = 0;
  for (int i = l; i <= r; i++)
    ans += min(abs(s[i] - s[n - i - 1]), 26 - abs(s[i] - s[n - i - 1]));
  ans += min(p - l, r - p) + (r - l);
  cout << ans;
}
