I want to find the order of the subgroup of $\mathbb{Z}/2018\mathbb{Z}$ generated by 8.
I know that since the order of $\mathbb{Z}/2018\mathbb{Z}$ is finite I can use Lagrange's theorem which says that the order of the sungroup generated by 8 must divide the order of $\mathbb{Z}/2018\mathbb{Z}$ which is 2018.
Now I am not sure where to go from here besides brute force checking which divisor of 2018 is the order of the subgroup generated by 8
Is there some other theorem or fact I could use to make my life easier?