#include int main() { int n, k, arrSize=0; scanf("%d %d", &n, &k); int arr[n], t; for (int i=0; ik) break; } } if (sum<=k) max=(max>sum ? max: sum); } printf("%d\n", max); return 0; }