For 35 buttons, you may consider using resistors for each and read them via an analog port. (One pin)

-----------