Man sentenced to 3 years in prison for Subway robbery