Wallpaper Pattern Waste

Calculate extra length needed for pattern matching.