Problem:
		
A: タイル貼り

		
問題

		

			縦 $h$ , 横 $w$ の大きさの長方形の壁に, 縦 $a$ , 横 $b$ の大きさの長方形のタイルを出来るだけたくさん貼りたい.
		

		

			タイルを貼る際は以下の条件を満たす必要がある.

			

				
タイルを重ねてはいけない.

				
タイルを斜めに貼ってはいけない. すなわち, タイルのどの縁も, 壁のどの縁に対しても平行, または垂直である.

				
タイルの向きを変えない. すなわち, 縦横を入れ替えない.

			

		

		

			出来るだけ多くのタイルを貼ったとき, タイルに覆われていない部分の面積の総和を求めよ.
		

		
制約

		

			
入力値は全て整数である.

			
$1 \leq h,w,a,b \leq 100$

		

		
入力形式

		
 入力は以下の形式で与えられる. 

		

			$h\ w$

			$a\ b$

		

		
出力

		

			タイルに覆われていない部分の面積の総和を出力せよ. また, 末尾に改行も出力せよ.
		

		
サンプル

		
サンプル入力 1

		

5 8
2 2

		
サンプル出力 1

		

8

		
サンプル入力 2

		

11 10
4 3

		
サンプル出力 2

		

38

		
サンプル入力 3

		

4 7
7 4

		
サンプル出力 3

		

28



Sample input:
5 8
2 2


Sample output:
8

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
a, b = map(int, input().split())

print(h * w - (a * b * ((h // a) * (w // b))))

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
a,b = map(int,input().split())
print(h*w - (h//a)*a*(w//b)*b)

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
a,b=map(int,input().split())
x,y=h//a,w//b
print((h*w)-(x*a*y*b))

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
a,b = map(int,input().split())
print(h*w-(a*(h//a)*b*(w//b)))

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
a,b=map(int,input().split())
print(h*w-(h//a)*a*(w//b)*b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

H, W = map(int, raw_input().split())
a, b = map(int, raw_input().split())

print H * W - (H / a * a) * (W / b * b)

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
c,d = list(map(int,input().split()))
sum1 = a*b
length2 = a // c
side2 = b // d
sum2 = (c*length2) * (d*side2)
print(sum1 - sum2)

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
a, b = map(int, input().split())
print(h*w-(h//a)*(w//b)*a*b)

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
a,b=map(int,input().split())
x=h//a*a
y=w//b*b
print(h*w-x*y)

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-
import sys


h,w = map(int, input().split())
a,b = map(int, input().split())

print(h*w - (h//a*a) * (w//b*b))

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
a,b = map(int,input().split())
ai = h//a*a
bi = w//b*b
print(h*w-ai*bi)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
h,w = LI()
a,b = LI()
y = h//a
x = w//b
ans = h*w-a*y*b*x
print(ans)

#B
"""
def m(x,y):
    if x == y:
        return "T"
    if x == "F":
        return "T"
    return "F"
n = I()
p = input().split()
ans = p[0]
for i in range(1,n):
    ans = m(ans,p[i])
print(ans)
"""

#C
"""
s = [[1]*8 for i in range(4)]
for i in range(4):
    s.insert(2*i,[1,0,1,0,1,0,1,0])
for j in range(8):
    for i in range(1,8):
        s[j][i] += s[j][i-1]
for j in range(8):
    for i in range(1,8):
        s[i][j] += s[i-1][j]
s.insert(0,[0,0,0,0,0,0,0,0,0])
for i in range(1,9):
    s[i].insert(0,0)
q = I()
for _ in range(q):
    a,b,c,d = LI()
    print(s[c][d]-s[c][b-1]-s[a-1][d]+s[a-1][b-1])
"""

#D
"""
n = I()
a = LI()
dp = [float("inf") for i in range(n)]
b = [[] for i in range(n)]
ind = [0 for i in range(100001)]
for i in range(n):
    k = bisect.bisect_left(dp,a[i])
    dp[k] = a[i]
    b[k].append(a[i])
    ind[a[i]] = max(i,ind[a[i]])
for i in range(n):
    if dp[i] == float("inf"):break
    b[i].sort()
    b[i] = b[i][::-1]
i -= 1
ans = b[i][0]
now_ind = ind[b[i][0]]
now_v = b[i][0]
while i >= 0:
    for j in b[i]:
        if ind[j] < now_ind and j < now_v:
            ans += j
            now_ind = ind[j]
            now_v = j
    i -= 1
print(ans)
"""
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
a,b=map(int,input().split())
high=(h//a)*a
wide=(w//b)*b
print(h*w-high*wide)

Submission status: Accepted

Solution code:
H, W = map(int, raw_input().split())
A, B = map(int, raw_input().split())

print (H % A * W) + (W % B * H) - (H % A) * (W % B)

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
a,b = map(int,input().split())
rh,rw = h%a, w%b
print(rh*w + rw*h - rh*rw)