An aeroelastic flapping motion of thin airfoils in a biplane configuration is optimized for maximum thrust. Airfoils are attached to swing arms by an elastic joint, which is model led by a torsional spring. A spring-mass system is employed for the aeroelastic coupling. The stiffness coefficient and the mass moment of inertia of the airfoil are optimized for maximum thrust. A gradient based optimization method is employed in a parallel computing environment. Unsteady, low speed flows are computed in parallel using a Navier-Stokes solver on moving and deforming overset grids. It is shown that the optimum aeroelastic pitching motion produces significantly higher thrust than that of the sinusoidal pitching.