CMIMC 2017 Team Problem 1

Find the integer n such that

n+\lfloor\sqrt{n}\rfloor+\lfloor\sqrt{\sqrt{n}}\rfloor=2017

Here, as usual, \lfloor\cdot\rfloor denotes the floor function.