#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
using namespace std;
int main(int argc, char const *argv[]) {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, p, j, l, d1 = 0, d2 = 0, fd = 0, presses = 0, flag, foo = -1LL;
  string str;
  cin >> n >> p >> str;
  if (p > n / 2)
    flag = -1;
  else
    flag = 1;
  assert(flag == 1 || flag == -1);
  std::vector<int> v;
  assert(v.size() == 0);
  j = n - 1;
  for (int i = 0; i < (n); ++i) {
    if (i > j) break;
    if (str[i] != str[j]) {
      presses += min(max((str[j] - str[i]), str[i] - str[j]),
                     26 - (max((str[j] - str[i]), str[i] - str[j])));
      if (flag == 1)
        v.push_back(i);
      else
        v.push_back(j);
    }
    j--;
  }
  if (presses == 0) {
    cout << "0" << endl;
    return 0;
  }
  p--;
  d1 = max((p - v[0]) * flag, foo);
  d2 = max((v[v.size() - 1] - p) * flag, foo);
  if (d1 == -1)
    fd += d2;
  else if (d2 == -1)
    fd += d1;
  else
    fd += 2 * min(d1, d2) + max(d1, d2);
  fd += presses;
  cout << fd << endl;
  return 0;
}
