Given two relatively prime positive integers m < n we consider the smallest positive solution (x0, y0) to the equation mx - ny = 1. E. I. Dinaburg and Y. G. Sinai have used continued fractions to show that the ratios x0/n are uniformly distributed in [0,1], when n and m run through consequtive integers of intervals of comparable sizes. We use a bound of exponential sums due to W. Duke, J. B. Friedlander and H. Iwaniec to show a similar result when m and n run through arbitrary sets which are not too thin.