X=[int(i) for i in input().split()] L=X[2] N=0 i=0 for i in range(2): s=X[i]//L if s*L==X[i]: N+=s else: N+=s+1 if X[0]==0: print(N) else: print(N+1)