Veeam Software interview question

Given an integer maxVal and another integer a, return the biggest integer b such that a^b <= maxVal.