Al-Baqarah - 2:51

وَإِذْ وَاعَدْنَا مُوسَى أَرْبَعِينَ لَيْلَةً ثُمَّ اتَّخَذْتُمُ الْعِجْلَ مِن بَعْدِهِ وَأَنتُمْ ظَالِمُونَ
[2:51]
And when We appointed a time of forty nights with Musa, then you took the calf (for a god) after him and you were unjust.
And remember We appointed forty nights for Moses, and in his absence ye took the calf (for worship), and ye did grievous wrong.
And when We did appoint for Moses forty nights (of solitude), and then ye chose the calf, when he had gone from you, and were wrong-doers.