#include<bits/stdc++.h> using namespace std; int a[3][4]={1,3,5,7,9,11,13,15,17,19,21,23}; int main(){ int i,j; cin>>i>>j; cout<<a[i][j]; return 0; }