import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x= sc.nextInt(); int y=sc.nextInt(); double l=sc.nextDouble(); int ans=0; if(x==0&&y==0){ System.out.println(0); return; } if(y>=0){ ans+=(int)Math.ceil(y/l); if(x!=0){ ans+=1+(int)Math.ceil(Math.abs(x)/l); } }else{ ans=(int)Math.ceil(Math.abs(y)/l); ans+=2+(int)Math.ceil(Math.abs(x)/l); } System.out.println(ans); } }