Last lon rides

anyone have any ideas as to how far out from an IM your last long ride and run should be?