一共 + Number + Measure Word + Noun
一共 means "altogether" or "in total," used to introduce a sum or combined quantity. Place it before the number to indicate the total count. It is commonly used in math contexts, shopping, and everyday counting.
这次考试我们班一共有三十个人参加。
Zhè cì kǎoshì wǒmen bān yígòng yǒu sānshí gè rén cānjiā.
A total of thirty students from our class took this exam.
今天买菜一共花了五十块钱。
Jīntiān mǎi cài yígòng huā le wǔshí kuài qián.
I spent a total of fifty yuan on groceries today.
三加五加二,一共是十。
Sān jiā wǔ jiā èr, yígòng shì shí.
Three plus five plus two equals ten in total.