Degrees of freedom

Number of degrees of freedom of a system is given by following,
N = 3A – R
Where,
A is the number of particles in the system and R is the number of independent relations among the particles.

For mono atomic gases, the degrees of freedom is three.
For diatomic gases, the degrees of freedom is five.
Linear triatomic molecules has seven degrees of freedom.
A non Linear triatomic molecules has six degrees of freedom.