题目链接:​​点击打开链接​


A. Divisibility



time limit per test



memory limit per test



input



output


k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.


Input



ka and b (1 ≤ k ≤ 1018; - 1018 ≤ a ≤ b ≤ 1018).


Output



Print the required number.


Examples



input



1 1 10



output



10



input



2 -4 4



output



5


#include<cstdio>
#include<algorithm>
#include<cstring>
#define LL long long
using namespace std;
LL k,a,b;
int main()
{
while(~scanf("%I64d %I64d %I64d",&k,&a,&b))
{
LL ans=0;
LL cnt1=abs(a)/k;
LL cnt2=abs(b)/k;
if(a>=0)
{
ans=cnt2-cnt1;
if(a%k==0) ans++;
}
else if(b<=0)
{
ans=cnt1-cnt2;
if(b%k==0) ans++;
}
else
{
ans=cnt1+cnt2+1;
}
printf("%I64d\n",ans);
}
return 0;
}