The congruent sides of an isosceles triangle are 1 unit longer than the length of the shortest side of the triangle. The perimeter of the triangle is the same as the perimeter of a square whose side length is 2units shorter than the length of the shortest side of the triangle. What is the length of the shortest side of the triangle?