To find the molecular formula of a compound, we need to count how many atoms of each element are in the molecule.
In organic molecules, the carbons are not always represented, but they are there.
Also, some hydrogens may be implied, so we need to check if all the atoms are making the proper number of bonds.
On the left part of the molecule, we have an aromatic ring with 6 carbon atoms. All of them have 4 bond represented, so there is no hydrogen atom missing there, just the 4 represented.
On the right part, we complete the molecule with 1 carbon and one nitrogen. Nitrogen makes 3 bonds, and all are represented there, so no missing hydrogens. The carbon on the right part has only three bonds represented, which means that there is one bond missing, which is an implied hydrogen.
So, in total we have 7 carbons, 6 hydrogens plus one implied and 1 nitrogen, so the molecular formula is: