#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
const int maxn = 100005;
const int inf = 0x3f3f3f3f;
int m, n, a, b;
char s[maxn];
int main() {
  while (scanf("%d%d%d", &n, &a, &b) != EOF) {
    cin >> s;
    int len = strlen(s);
    a--;
    b--;
    int ans = 0;
    if (s[a] != s[b]) ans++;
    cout << ans << endl;
  }
  return 0;
}
