import java.util.*; public class Test12 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String[] line; line=sc.nextLine().split(" "); int x=Integer.parseInt(line[0]); line=sc.nextLine().split(" "); int y=Integer.parseInt(line[0]); line=sc.nextLine().split(" "); int l=Integer.parseInt(line[0]); int turn=0; if(x!=0){ turn=1; if(x<0) x*=-1; } if(y<0){ turn=2; y*=-1; } turn+=(x+l-1)/l; turn+=(y+l-1)/l; System.out.println(turn); sc.close(); } }