There was a bottle A filled with sea water. The weight of the sea water was 250g, and it included 5% of the sea salt. I mixed the sea water with another bottle B which consisted of 8% of sea salt. The total percentage of salt of the mixed water was 6.8%. How much did A and B weigh altogether in grams?