A regular polygon of n sides has each angle equal to 45 degrees find the value of n.​