Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
[map(int, a[i]) for i in len(a)]
 
for i in range(len(a)):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=(len(a)-1):
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
map(int, a)
 
for i in range(len(a)):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=(len(a)-1):
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
map(int, a)
 
for i in range(len(a)):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
map(int, a)
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
 
for i in len(a):
  map(int, a[i])
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
map(int, a)
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = int(line[1])
ans = 0
 
a = sorted(input().split())
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = int(input().split()[1])
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if x==0:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = int(input().split()[1])
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if a[i]==x:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split()[1]
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if a[i]==x:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split()[1]
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    if i!=len(a)-1:
      ans+=1
    else:
      if a[i]=x:
        ans+=1
      print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split()[1]
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print(ans)
    break
  else:
    x-=a[i]
    ans+=1
print(ans)

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split()[1]
ans = 0
 
a = input().split()
a.sort()
 
for i in len(a):
  if a[i] > x:
    print ans
    break
  else:
    x-=a[i]
    ans+=1
print ans

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
x = input().split()[1]
ans = 0
 
a = sorted(input().split())
 
for i in len(a):
  if a[i] > x:
    print ans
    break
  else:
    x-=a[i]
    ans+=1
print ans

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = line[1]
ans = 0
 
a = input().split().sort()
 
for i in len(a):
  if a[i] > x:
    print ans
    break
  else:
    x-=a[i]
    ans+=1
    continue
print ans

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = line[1]
ans = 0;
 
a = input().split().sort()
 
for i in len(a):
  if a[i] > x:
    print ans
    break
  else:
    x-=a[i]
    ans+=1
    continue
print ans

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)

Buggy python submission (verdict: Runtime Error):
line = input().split()
x = line[1]
ans = 0;

a = input().split().sort()

for i in len(a):
  if a[i] > x:
    print ans
    break
  else:
    x-=a[i]
    ans++
    continue
print ans

Fixed submission:
line = input().split()
N = int(line[0])
x = int(line[1])
ans = 0

a = input().split()
a = [int(i) for i in a]
a.sort()

for i in range(N):
    if a[i] > x:
        print(ans)
        break
    else:
        x -= a[i]
        if i != (N - 1):
            ans += 1
        else:
            if x == 0:
                ans += 1
            print(ans)