AM-SAM: Automated Prompting and Mask Calibration for Segment Anything Model