import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto A = s[1];
    auto B = s[2];

    int ans = 0;
    int x;
    foreach (i; 1..10000) {
        if (A/i == 0 || B/i == 0) {
            x = min(A, B);
        } else {
            x = i;
        }
        if (A/x + B/x >= N) {
            ans = max(ans, x);
        }
    }

    ans.writeln;
}
