A new technique for obtaining Monte Carlo algorithms based on the Markov chains with a finite number of states is suggested. Instead of the classical “random walk on neighboring mesh points,” a general way of constructing Monte Carlo algorithms that could be called “random walk on distant mesh points” is considered. It is applied to solve boundary value problems. The numerical examples indicate that the new methods are less laborious and therefore more efficient.