Skip to main content
3 of 3
added 9 characters in body
Dorian
  • 3k
  • 14
  • 12

05AB1E, 7 6 bytes

∞-γ€gZ

Try it online!

Thanks to @Kevin Cruijssen for -1 byte

Code:

∞       push endless list [1, 2, 3, 4, 5, ...]
-       subtract that from input
γ       group by equal elements
€g      push lengths of each group
Z       push max length
        implicitly print top of stack
Dorian
  • 3k
  • 14
  • 12