Inflationary universe with fluctuating dimension