A treasure hunter discovered a buried treasure chest filled with 5155 rubys and 45 diamonds. How many gems were there in total?