Try and only put baby on your breast when they have a full open mouth. The midwife will probably be 'shoving' your baby's head right up to your breast.
If it is not comfortable, break baby's mouth seal with your finger and try again.
Cracked nipples, crazed nipples, or sore nipples are so common.
I suggest you use Purelan nipple cream after every feed, so pack this in your hospital bag.
I know it sounds rude, but try and let the air circulate your nipples as that can help.
And work on your latching. Get a midwife to help you every time you latch baby to your breast when in the hospital.
If it still hurts 1 or 2 days when you get home, speak to your midwife or doctor.
Occassionally a baby may have trouble latching due to tongue tie - they cant lift up their tongue and get the sucking motion working as well. This can be cut by doctor.
If you still have very painful nipples (like with blood) you may want to look at getting some silicone nipple protectors. They go over your nipple while baby is sucking. Made from very thin silicone, and baby can still get the skin-to-skin contact with you. Though some midwives will not recommend these because they don't like anything that inhibits or restricts the amount of skin contact. But if these can reduce your pain and still help you to breastfeed then they are something that i would personally recommend!