front and back dp(1,800の該当)