1625625 time complexity: 2499