John has some apples, and two brothers, Jack and Jim.
John eats 3 of his apples and splits the remainder equally between himself and each one of his brothers. Jack and Jim both eat half the apples they have been given. Together the three brothers have 4 apples left.
How many apples did John start with?