function R = obratnoe(N,M)
    R = 1;
    K = 0;
    while K < 1000
        if mod(R, N) == 0
            break
        else
            K = K+1;
            R = R + M;
        end
    end
    R = R/N;
end