First make a hole with two blocks next to it like this. Green is input and the hole is output.
Then going off the green block, place a repeater, then a sticky piston.
Place a block above the piston, then put 2 redstone down like this.
From the redstone, turn around and place a repeater and another sticky piston.
Put a red stone torch in the hole and red stone beside it. The redstone there is your output.