Veeam Software Interview Question

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