def main(): x = int(input()) y = int(input()) l = int(input()) count = 0 if(y < 0): #南方向に進む場合 count += 2 while(y > 0): #南北に進む y -= l count += 1 if(x != 0): count += 1 while(x > 0): #東西に進む y -= l count += 1 print(count) if __name__ == '__main__': main()