A tank initially had an amount of water (let's call it 'g'). But then, 3 gallons of water were removed from it and the remaining amount of water was 40 gallons. How much water was initially in the tank?