import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner in
= new Scanner
(System.
in); float k = in.nextInt(), n = in.nextInt(), m = in.nextInt(), d = in.nextInt(), s = (d * k * n * m) / (k * n * m - k * m - k * n - m * n);
if ((1 / k
+ 1 / n
+ 1 / m
>= 1) | (Math.
floor(s
/ k
) != s
/ k
| Math.
floor(s
/ n
) != s
/ n
| Math.
floor(s
/ m
) != s
/ m
) | !(Math.
floor(s
) == s
)) }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWZsb2F0IGsgPSBpbi5uZXh0SW50KCksIG4gPSBpbi5uZXh0SW50KCksIG0gPSBpbi5uZXh0SW50KCksIGQgPSBpbi5uZXh0SW50KCksIHMgPSAoZCAqIGsgKiBuICogbSkgLyAoayAqIG4gKiBtIC0gayAqIG0gLSBrICogbiAtIG0gKiBuKTsKCQlpZiAoKDEgLyBrICsgMSAvIG4gKyAxIC8gbSA+PSAxKSB8IChNYXRoLmZsb29yKHMgLyBrKSAhPSBzIC8gayB8IE1hdGguZmxvb3IocyAvIG4pICE9IHMgLyBuIHwgTWF0aC5mbG9vcihzIC8gbSkgIT0gcyAvIG0pIHwgIShNYXRoLmZsb29yKHMpID09IHMpKQoJCQlTeXN0ZW0ub3V0LnByaW50bG4oLTEpOwoJCWVsc2UgU3lzdGVtLm91dC5wcmludGxuKE1hdGgucm91bmQocykpOwoJfQp9