During the star formation, dust coagulates by sticking and grows larger to form pebbles and planetesimals. We simultaneously calculate this dust growth process through the gravitational collapse of the molecular cloud core to investigate where, how, and to what size the dust grows and how it scatters into the surrounding space. To calculate this star formation process, we have extended the 3D AMR-MHD fluid code SFUMATO to handle not only gas but also dust motion under the fluid approximation. The ohmic dissipation and the momentum exchange between gas and dust due to drag force are taken into account. Dust coagulation is calculated under the representative mass approximation and the fragmentation barrier is implemented as a single threshold of 50 m s^-1 for icy dust. Starting from a 2.5 solar mass Bonner-Ebert sphere with a turbulent magnetic field, we investigate up to 12,000 years after star formation. As for dust, we consider compact dust consisting of 0.1 micrometer or 5 nanometer monomers. Twelve thousand years after the birth of the star, a protoplanetary disk of about 12 AU in size, 0.018 solar mass, and density of more than 10^-13 g cm^-3 formed around the 0.32 solar mass star. The size of the dust just outside the protoplanetary disk is about 1 micrometer, while the size of the dust inside the protoplanetary disk reaches 1 mm to 1 cm. This indicates that dust grows mainly inside protoplanetary disks and that its size has already grown to about the size of a pebble at the class 0/1 stage. It was also found that some of the dust that grew to tens of micrometers or centimeters could be intermittently scattered by the gas outflow into space on the scale of hundreds of astronomical units.