As long as you act in accordance with the laws of both countries and do not make drastic “renunciation” style decisions – such as joining the other country’s military or expressing a voluntary intention to renounce U.S. citizenship – you retain U.S. citizenship.