If a fruit seller arranges the oranges in the form of a square then he is left with 38 more oranges that do not fit into the square. However, when he increases the size of square by one unit each side he is short by 25 oranges. How many total oranges were there?