4. Pete's bank account contains 500 dollars. The bank allows only two types of transactions: withdrawing 300 or adding 198 dollars. What is the maximum amount Pete can withdraw from his account if he has no other money?
4. Since 300 and 198 are divisible by 6, Petya will only be able to withdraw an amount that is a multiple of 6 dollars (see fact 5). The maximum number that is a multiple of 6 and does not exceed 500 is 498.

Let's show how to withdraw 498 dollars. We will perform the following operations: $500-300=200, 200+198=398, 398-300=98, 98+198=296, 296+198=494$. The amount in the bank has decreased by 6 dollars.

By repeating this procedure 16 times, Petya will withdraw 96 dollars. Then he can withdraw 300, deposit 198, and withdraw 300 again. As a result, he will have 498 dollars.