Elements of Statistical Mechanics