import java.util.Scanner; class robotto{ public static void main(String args[]){ Scanner s = new Scanner(System.in); int x = s.nextInt(); int y = s.nextInt(); int L = s.nextInt(); int xtime = (int)Math.abs(x / L); int ytime = (int)Math.abs(y / L); int retur = 0; if(x != 0 && y >= 0){ retur = 1; }else if(y < 0){ retur = 2; } if(x % L != 0){ xtime += 1; } if(y % L != 0){ ytime += 1; } System.out.println(xtime + ytime + retur); } }