algorithm : str right move n length