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 print(N+1)