Double- and triple-barrier Josephson junctions