All perfect praise be to Allah. Blessings and peace be upon Prophet Mohammad and upon his family and righteous companions,
The Sunnah of coming out of the state of Ihram in Hajj, or Umra is to shave, or trim all the hair of the head. The minimum of the hair that should be shaved, or trimmed is three hairs. Therefore, the Hajj and the Umra of the pilgrim who adheres to this is valid and he is free from the liability.
Al-Imam An-Nawawi said in [Al-Majmou (8/200)] : “ It is better that the pilgrim shaves, or trims the whole head. The accepted minimum for either is three hairs, but less than that isn`t acceptable. This is the opinion of the Shafites and the fellow scholars.” And Allah knows best.