Yandex Interview Question

How would you solve (~div 3) problem?