#!/usr/bin/env python
# coding: utf-8

# In[1]:


#sol_1
a, b = input().split()
print(int(a) & int(b)) # & (bitwise and)


# In[2]:


#sol_2
a,b = map(int, input().split())
print(a & b)


# In[ ]:




