import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { int y = sc.nextInt(); int x = sc.nextInt(); int l = sc.nextInt(); y = Math.max(y,-1*y); int count = 0; double etc = Math.pow(10,-10); if(x<0){ count += 2; x = -1*x; if(((double)x/(double)l-x/l)0){ if(((double)y/(double)l-y/l)0){ if(((double)x/(double)l-x/l)0){ count++; if(((double)y/(double)l-y/l)