31 is perfect and I'll link a site with that information more clearly stated out. Once you figure out what Ivs your Pokemon has, go to their stats page and right below their icon are little shapes like a circle, triangle, diamond and so on. If your Pokemon's HP stat is perfect, tap the first little icon to make it darker. Then just go down the line with the IVs it has.
Ivs. I'm pretty sure you're talking about Individual Values, if not I'm sorry! But first you need to go to the Battle Resort and talk to the green haired man in the Pokemon Center. He'll ask to see one of your Pokemon. Show him one of them, and he will tell you whether your Pokemon has IVs and which stat it has perfect, or good, points in that stat.