In this paper an optimal stopping problem is considered. Only one of two sequences of random variables which are independent copies of a known continuously distributed random variable is observed. It is necessary to stop the observation at the moment in which at most k values of the unobserved sequence are greater than the observed maximum, with maximal probability. The optimal stopping rule for the finite length of the observation is obtained.