#include <bits/stdc++.h>
using namespace std;
unsigned long long int k;
long long int n, m;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> k >> n >> m;
  if (k == 1) {
    if (n > 0 && m > 0) {
      cout << m - n + 1;
      return 0;
    }
  }
  if (n > 0 && m > 0) {
    n--;
    if (n != 1 && n != k)
      cout << (m / k) - (n / k);
    else
      cout << (m / k);
    return 0;
  } else if (m >= 0 && n < 1) {
    cout << (m / k) + ((n * (-1)) / k) + 1;
    return 0;
  } else if (n == 0 && m == 0) {
    cout << 1;
    return 0;
  }
  n *= -1;
  m *= -1;
  m--;
  cout << (n / k) - (m / k);
}
