#include <bits/stdc++.h>
int main() {
  long long k, a, b, i, d;
  scanf("%lld %lld %lld", &k, &a, &b);
  if (a > b)
    d = a - b;
  else
    d = b - a;
  if (a / k == 0 && b / k == 0 && (a < 0 && b < 0 || a > 0 && b > 0))
    printf("0");
  else if (k == 1)
    printf("%lld", d + 1);
  else if (a % k == 0 && b % k == 0)
    printf("%lld", (d + 1) / k + 1);
  else if (a % k != 0 && a == b)
    printf("0");
  else {
    if (a % k != 0) {
      if (k > a && a >= 0)
        a = a + (k - a);
      else if (a <= 0)
        a = (a / k) * k;
      else if (a > 0)
        a = (a / k) * k + k;
    }
    if (b % k != 0) {
      if (b >= 0)
        b = (b / k) * k;
      else
        b = (b / k) * k - k;
    }
    if (a >= b)
      d = a - b;
    else
      d = b - a;
    printf("%lld\n", ((d + 1) / k) + 1);
  }
  return 0;
}
