2010-04-08 #1 A. Theater Square Codeforces Theater Square n,m,a = [int(x) for x in raw_input().split()] print ((n+a-1)/a)*((m+a-1)/a)