#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    long long n, x, y;
    cin >> n >> x >> y;

    if (x > y) {
        swap(x, y); // Ensure x is always the faster one
    }

    // Binary search over time to find the minimum time required
    long long low = 0, high = (n - 1) * y; // Maximum time possible
    long long answer = high;

    while (low <= high) {
        long long mid = (low + high) / 2;

        // How many copies can be made in 'mid' seconds
        long long copies = mid / x + mid / y;

        // We already have the original copy, so we need (n - 1) more copies
        if (copies >= n - 1) {
            answer = mid;
            high = mid - 1; // Try to find a smaller time
        } else {
            low = mid + 1; // Increase the time
        }
    }

    // Add the time for the first copy
    cout << answer + x << endl;

    return 0;
}
