import java.util.Scanner; import java.math.BigDecimal; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); BigDecimal t = scanner.nextBigDecimal(); BigDecimal x = scanner.nextBigDecimal(); BigDecimal y = scanner.nextBigDecimal(); BigDecimal z = lcm(x, y); scanner.close(); BigDecimal ans = BigDecimal.ZERO; ans = ans.add(t.divide(x)); ans = ans.add(t.divide(y)); ans = ans.subtract(t.divide(z)); System.out.println(ans.toPlainString()); } private static BigDecimal gcd(BigDecimal x, BigDecimal y) { if (x.compareTo(y) < 0) return _gcd(y, x); return _gcd(x, y); } private static BigDecimal _gcd(BigDecimal x, BigDecimal y) { BigDecimal r = x.remainder(y); if(r.compareTo(BigDecimal.ZERO) == 0) return y; return _gcd(y, r); } private static BigDecimal lcm(BigDecimal x, BigDecimal y) { return x.multiply(y).divide(gcd(x, y)); } }