A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.
'I, Robot' (1950) in 'Runaround'

A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.