Here is the description of Deutsch-Jozsa problem: Let $f: \{0,1\}^n \mapsto \{0,1\}$ be a function promised to be either constant or balanced ('balanced' means that $f$ outputs as many 0's as 1's).
I need to show that a probabilistic classical algorithm making two evaluations of $f$ can with probability at least 2/3 correctly determine whether $f$ is constant or balanced.
There is also a hint: Your guess does not need to be a deterministic function of the results of the two queries. Your result should not assume any particular a priori probabilities of having a constant or balanced function.
I'm a bit lost here. My thinking is that if the two evaluations are the different, then $f$ is definitely balanced. Otherwise, $f$ could be either constant or balanced. But the chance of success would be depending on the probability of $f$ being constant, which is against the given hint.
How should I approach this problem?