#include <iostream>
using namespace std;

int jou(int x,int y){
  int ans = 1,i;

  for(i = 0;i < y;i++){
    if(y != 0) ans *= x;
  }
  if(y == 0) ans = 1;
  return ans;
}


int main(){
  int qu,i = 0,keta = 0,a,n;
  int bin[999];

  cin >> n;

  int sum = n;
  //keta
  while(1){
    if(n < 4 )break;
    keta++;   
     n /= 4;
  }

  keta ++;
  // cout << "keta = " << keta << endl;

  for(int i = keta - 1;i > 0;i--){
    bin[i] = sum / jou(4,i);
    // cout << "bin[i] = " << bin[i] << "jou(4,1) = " << jou(4,i) << endl;
    sum = sum - jou(4,i) * bin[i];
  }

  bin[0] = sum;

  for(int i = keta - 1;i >= 0 ;i--){
    cout  << bin[i]  ;
  }
  cout << endl;
 
}