#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, n, a, b, ans = 0, mx = 1000000000;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  long long int t = 0;
  if (a > b) {
    if (s[a - 1] == s[b - 1])
      cout << 0 << endl;
    else {
      for (j = b; j <= a - 1; j++) {
        if (s[j - 1] != s[j]) {
          t++;
        }
        if (s[j] == s[a - 1]) break;
      }
      cout << t << endl;
    }
  } else {
    if (s[a - 1] == s[b - 1])
      cout << 0 << endl;
    else {
      for (j = a; j <= b - 1; j++) {
        if (s[j - 1] != s[j]) {
          t++;
        }
        if (s[j] == s[b - 1]) break;
      }
      cout << t << endl;
    }
  }
  return 0;
}
