// 1 2 3 4 5 6 7 8 9 1 2 3 4
// 存在数组中是 a[0] = 4 3 2 1~ 因为如果 a[0]是 1 每次在数组头加一位非常麻烦

// 高精度2的N次幂
#include <cstdio>
#include <cmath>

using namespace std;

const int N = 3010;

int main(){
    int a[N] = {1};
    int n;
    
    scanf("%d", &n);
    
    int m = 1;
    
    printf("%lf\n", pow(2, n));
    
    for(int i = 0; i < n; i++){
        int t = 0;
        for(int j = 0; j < m; j++){
            t += a[j] * 2;
            a[j] = t % 10;
            t /= 10;
        }
        if(t) a[m++] = 1;
    }
    for(int i = m - 1; i >= 0; i--) printf("%d", a[i]);
    printf("\n");
    
    return 0;
}