A, B, and C each have a certain amount of sugar. A takes some sugar from B to double the original number of sugar blocks. B takes some sugar from C to double the number of remaining sugar blocks. times, C then takes some sugar from A, which also doubles the number of pieces left. At this time, the three of them had the same amount of candy. At the beginning, C has 32 pieces of candy, how many pieces of candy did B originally have?
甲、乙、丙三人各有糖若干块，甲从乙处取来一些糖，使原来有糖的块数增加一倍，乙从丙处取来一些糖，使留下的块数增加一倍，丙再从甲处取来一些糖，也使留下的块数增加一倍．这时三人的糖块一样多．开始时，丙有32块糖，则乙原来有多少块糖？
<result>40</result>